You are right. This is not what the Courts have decided. The militia is, historically, just the men of military age—15-45. There is also the organized militia, which is those men who are trained for war. The Minutemen who stood on Lexington Green brought their own weapons.
The militia as defined in Federalist papers is... all of the able bodied (men at the time, but now women too) who can carry a firearm or bear arms. In short it is ALL of the people, who were considered to be necessary to a Free State.
Just like in Switzerland— every house has an automatic weapon— it has to. This country was meant to BE Switzerland.