According to MEMORANDUM FOR THE PRESIDENT / SUBJECT: Military Service by Transgender Individuals:
• Transgender persons with a history or diagnosis of gender dysphoria are disqualified from military service, except under the following limited circumstances: (1) if they have been stable for 36 consecutive months in their biological sex prior to accession; (2) Service members diagnosed with gender dysphoria after entering into service may be retained if they do not require a change of gender and remain deployable within applicable retention standards; and (3) currently serving Service members who have been diagnosed with gender dysphoria since the previous administration's policy took effect and prior to the effective date of this new policy, may continue to serve in their preferred gender and receive medically necessary treatment for gender dysphoria.
• Transgender persons who require or have undergone gender transition are disqualified from military service.
• Transgender persons without a history or diagnosis of gender dysphoria, who are otherwise qualified for service, may serve, like all other Service members, in their biological sex.
(emphasis mine)
So this seems to rely heavily on one's biological sex, but a US legal definition of biological sex is not something that's easy to find online. Is there one at all? If so, what's the text?