Article 1, Section 8 of US Constitution:
"The Congress shall have Power... To provide for calling forth the Militia to execute the Laws of the Union, suppress Insurrections and repel Invasions"
United States Code:
TITLE 10 > Subtitle A > PART I > CHAPTER 13 > § 311
§ 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 merabers 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 merabers of the militia who are not merabers of the National Guard or the Naval Militia.
This is justification for the draft. All able-bodied males 17-45 are part of the unorganized militia and as such are eligible to be called forth by congress. The method in which this is done is the draft as executed by the Selective Service.