A well regulated militia being necessary to the security of a free state, the right of the people to keep and bear arms shall not be infringed.
The thing is every state (for the last 100 years or so) has a well regulated militia. It's called the National Guard. That sentence also implies that the people with guns would have been trained in not only guns but military aspects as well. Otherwise, how else can your militia be well regulated.
The National Guard is a subset of the Militia, not a replacement. The militia as defined when the constitution was written was every able bodied male between the ages of 17 and 45. That group is now known as the reserve militia and includes everyone who is eligible for the draft which would be just about everyone in this thread living in the USA. Regardless, the Supreme Court has ruled that the statement "A well regulated militia being necessary to the security of a free state" is an example of why "the right of the people to keep and bear arms shall not be infringed", not a limiting clause. That should be clear if you look at the original wording before it entered review.
The right of the people to keep and bear arms shall not be infringed; a well armed and well regulated militia being the best security of a free country but no person religiously scrupulous of bearing arms shall be compelled to render military service in person.