Note that the Constitution refers to the milita. The Second Amendment refers to 'the people'.
While I'm expounding on this, let us examine the legal definition of 'militia.'
TITLE 10 > Subtitle A > PART I > CHAPTER 13 > Sec. 311.
Sec. 311. - 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 to become, citizens of the United States and of female citizens of the United States who are members of the National Guard.
(b) The classes of the militia are -
(1) the organized militia, which consists of the National Guard and the Naval Militia; and
(2) the unorganized militia, which consists of the members of the militia who are not members of the National Guard or the Naval Militia
Note that ALL able-bodied males between 17-45 are members of the 'unorganized' militia, and therefore under potential State control. The people (those not members of the militia) still retain their right to keep AND bear arms.
I also note that Article One, Section Eight grants Congress two distinct powers... one of which is:
To raise and support armies, but no appropriation of money to that use shall be for a longer term than two years;
This is the Constitutional law under which Congress funds our standing army. It has nothing to do with the 'militia,' which is covered by the clause in question.
Congress shall have the power to ... To provide for organizing, arming, and disciplining, the Militia...)
That's only the federal definition, each state has it's own. The age range is much larger in Texas, and all females, not just those who are members of the National Guard, are also included.