The first part of the second Amendment does not invalidate the second part.
"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 first part just gives a reason why the people have the right. The second part says it cannot be infringed. So even if we don't have militias, there still cannot be a law that infringes the right. As DVvM said, the Supreme Court came to this decision, as is their power to do so, so that is the law of the land. For all intents and purposes on the legal front, this argument has been laid to rest unless a future Supreme Court overturns the decision, which is unlikely to happen any time soon.