Inclusion Criteria:
* PATIENTS: Age 10 to =\< 65 years at the time of consent. Age eligibility is further constrained by the conditioning regimen assigned: Regimen A (high-dose TBI) is restricted to participants =\< 45 years; Regimen B (intermediate intensity) is open across the full eligible age range
* PATIENTS: All patients must meet weight of \>= 40 kg
* PATIENTS: Participants must have a high-risk hematologic malignancy with an indication for allogeneic hematopoietic cell transplantation (allo-HCT), meeting one of the following
* Acute myeloid leukemia: in first complete remission (CR1), second complete remission (CR2) or greater, with \< 5% marrow blasts at transplant. Morphologic remission with persistent cytogenetic, flow-cytometric or molecular (MRD) aberrations is eligible
* Acute lymphoblastic leukemia: in CR1 at high risk of relapse (high-risk cytogenetic or molecular abnormalities, failure to achieve MRD-negative remission, or persistent or recurrent MRD), CR2 or greater. Acute lymphoblastic leukemia (ALL) with \< 5% blasts but persistent cytogenetic, flow-cytometric or molecular aberrations is eligible
* Other acute leukemias of ambiguous lineage or mixed phenotype with \< 5% blasts; morphologic remission with persistent MRD is eligible
* Chronic myeloid leukemia, excluding refractory blast crisis; in first chronic phase the participant must have failed or be intolerant to tyrosine kinase inhibitor therapy
* Myelodysplastic syndrome or myeloproliferative disorder: \< 10% marrow myeloblasts and absolute neutrophil count (ANC) \> 0.2 x 10\^9/L (growth-factor supported if necessary) at work-up
* PATIENTS: No readily available, suitably human leukocyte antigen (HLA)-matched related or unrelated adult donor, with cord blood unit(s) meeting institutional cell-dose and HLA criteria
* PATIENTS: Karnofsky \>= 70% (participants \> 16 years) or Lansky \>= 70% (participants =\< 16 years); Eastern Cooperative Oncology Group (ECOG) 0-1. Participants older than 45 years must in addition have an hematopoietic cell transplantation-specific comorbidity index (HCT-CI) =\< 5
* PATIENTS: Calculated creatinine clearance \> 70 mL/min (adults) or \> 70 mL/min/1.73 m\^2 (children)
* PATIENTS: Bilirubin \< 1.5 mg/dL unless attributable to benign congenital hyperbilirubinemia or hemolysis
* PATIENTS: Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) \< 3 x upper limit of normal
* PATIENTS: Corrected diffusion capacity of the lung for carbon dioxide (DLCO) \> 60% predicted for participants \> 18 years; oxygen saturation \> 92% on room air for participants =\< 18 years or unable to perform pulmonary function testing
* PATIENTS: Left ventricular ejection fraction \> 50%, or fractional shortening \> 22% in children
* PATIENTS: Albumin \> 3.0g/dL
* PATIENTS: Able to swallow oral medication or to receive it enterally, for example by nasogastric or gastrostomy tube
* PATIENTS: Participant or legally authorized representative able to provide informed consent and to comply with the treatment protocol, supportive care, long-term follow-up and research assessments
* DONORS: HLA matching: the cord blood (CB) graft(s) must be matched at a minimum of 4/6 HLA-A, -B, -DRB1 loci with the recipient (0-2 mismatches at A, B or DRB1), based on intermediate-resolution A/B antigen and DRB1 allele typing. High-resolution typing is permitted per institutional guidelines provided the minimum criterion is met
* DONORS: Single-unit cell dose: \>= 3 x 10\^7 TNC/kg, or \>= 2.5 x10\^7 TNC/kg if CD34+/kg \>= 1.7 x 10\^5 (match grade 4/6-6/6)
* DONORS: Double-unit cell dose: combined \>= 3.0 x 10\^7 TNC/kg, with each unit \>= 1.5 x 10\^7 TNC/kg (pre-cryopreservation)
* DONORS: Recommended CD34+ dose: minimum total recommended 2 x 10\^5 CD34+/kg
* DONORS: Regulatory: units are Food and Drug Administration (FDA)-licensed or obtained under an appropriate Investigational New Drug (IND), for example through the National Marrow Donor Program (NMDP) or the National Cord Blood Program
Exclusion Criteria:
* PATIENTS: Known hypersensitivity or contraindication to sitagliptin or to any DPP-4 inhibitor
* PATIENTS: History of pancreatitis of any cause, or clinical suspicion of active pancreatitis at the time of enrollment
* PATIENTS: Estimated glomerular filtration rate \< 30 mL/min/1.73 m\^2, or requirement for dialysis
* PATIENTS: Type 1 diabetes mellitus, or type 2 diabetes mellitus currently treated with a DPP-4 inhibitor or a GLP-1 receptor agonist that cannot be discontinued prior to conditioning
* PATIENTS: Active insulin dependence
* PATIENTS: Active GVHD requiring systemic therapy from a prior transplant
* PATIENTS: Active, uncontrolled infection at the time of transplantation; active or recent (within 6 months) invasive fungal infection without infectious disease consultation and approval
* PATIENTS: Persistent central nervous system involvement (cerebrospinal fluid \[CSF\] or imaging) at screening
* PATIENTS: Prior checkpoint inhibitor therapy within the preceding 12 months
* PATIENTS: Two or more prior stem cell transplants of any kind; one prior autologous transplant within the preceding 12 months; or prior allogeneic transplantation with active GVHD on systemic therapy
* Note: prior allogeneic transplantation is permitted only for participants undergoing a planned second transplant who do not have active GVHD requiring systemic immunosuppression; such participants are among those for whom CBT offers the strongest graft-versus-leukemia (GVL) advantage
* PATIENTS: Presence of a second malignancy for which expected 5-year survival is less than 75%
* PATIENTS: HIV infection; hepatitis B or C infection with measurable viral load; hepatic cirrhosis
* PATIENTS: Inadequate performance status or organ function
* PATIENTS: Pregnancy, breastfeeding, or unwillingness to use effective contraception during study treatment
* PATIENTS: Participation in a trial of another investigational agent within 30 days prior to enrollment
* PATIENTS: Any condition or laboratory abnormality that in the judgment of the principal investigator precludes safe participation or would compromise interpretation of study results
* DONORS: For double-unit recipients, no unit with \< 1.5 x 10\^7 TNC/kg or \< 1.0 x 10\^5 CD34+/kg
* DONORS: Units without full maternal testing and negative results for hepatitis B, hepatitis C, HIV and HTLV-1
* NOTE: Cord blood units are presumed cytomegalovirus (CMV)-indeterminate or negative regardless of serologic testing, because of passive transmission of maternal antibodies