; (ii) such youth who are pregnant or parenting; (iii) such youth who have been involved in the child welfare system; and (iv) such youth who have been involved in the juvenile justice system; ; and (B) in subparagraph (F), by striking intrafamily problems and inserting problems within the family, including (if appropriate) individuals identified by such youth as family, . (b) Nondiscrimination Part F is amended by inserting after section 386A ( 34 U.S.C. 11278 ) the following: 386B. Nondiscrimination (a) In general No person in the United States shall, on the basis of actual or perceived race, color, religion, national origin, sex, gender identity (as defined in section 249(c)(4) of title 18, United States Code), sexual orientation, or disability, be excluded from participation in, denied the benefits of, or subjected to discrimination under any program or activity receiving Federal financial assistance under title III of the Juvenile Justice and Delinquency Prevention Act of 1974. (b) Exception (1) Essential sex-segregated or sex-specific programming If programming that is segregated by or specific to sex is necessary to the essential operation of a program, nothing in this section shall be construed to prevent the entity carrying out any such program or activity from consideration of an individual's sex. (2) Exceptions In such a circumstance, the entity may meet the requirements of this section— (A) by providing comparable services to individuals who cannot be provided with the sex-segregated or sex-specific programming