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.