I've heard this one a couple of times as well, but never followed up on looking for it.
Decided to actualy take a look and see if I could find it.
Library of Congress:
https://tile.loc.gov/storage-services/service/ll/llsl//llsl-c57/llsl-c57.pdfSee PDF page 840, page number 775.
Haven't read the entire thing, or to see if it was later changed or repealed in any way, but the first paragraph is interesting:
Be it enacted by the Senate and House of Representatives of the United
States of America in Congress assembled, That the militia shall consist
of every able-bodied male citizen of the respective States, Territories,
and the District of Columbia, and every able-bodied male of foreign
birth who has declared his intention to become a citizen, who is more
than eighteen and less than forty-five years of age, and shall be divided
into two classes-the organized militia, to be known as the National National Guard.
Guard of the State, Territory, or District of Columbia, or by such
other designations as may be given them by the laws of the respective
States or Territories, and the remainder to be known as the Reserve
Militia