Where did you read that the militia mentioned is one formed to resist the U.S. Government? Way off base. Let's look at what is actually written:
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.
Nothing in there about resisting the U.S. government. Rather the militia is mentioned to help with the security of the state...actually it says it is "necessary" for the security of the state. This directly contradicts what you just wrote.