Quick search by citation:

10 U.S. Code § 1170 - Regular enlisted members: minority discharge

Upon application by the parents or guardian of a regular enlisted member of an armed force to the Secretary concerned within 90 days after the member’s enlistment, the member shall be discharged for his own convenience, with the pay and form of discharge certificate to which his service entitles him, if—
(1)
there is evidence satisfactory to the Secretary concerned that the member is under eighteen years of age; and
(2)
the member enlisted without the written consent of his parent or guardian.