SCOTUS deep-sixed your analysis of the  predicate clause regarding the "necessity of a well-regulated militia" back in 2008.

The Second Amendment protects an individual right to possess a firearm unconnected with service in a militia, and to use that arm for traditionally lawful purposes, such as self-defense within the home. ~ District of Columbia v. Heller, 554 U.S. 570 (2008)
https://www.law.cornell.edu/supct/html/07-290.ZS.html

And that ratio was extended nation-wide two years later in  in McDonald v. Chicago, 561 U.S. 742 (2010) which was brought in response to Heller and decided in 2010, that invalidated much of Chicago's gun purchase and registration laws.