You are %100 correct:
10 U.S. Code § 246 - Militia: composition and classes
(a)The militia of the United States consists of all able-bodied males at least 17 years of age and, except as provided in section 313 of title 32, under 45 years of age who are, or who have made a declaration of intention...
— LiberalForum Archive