It isn't about "arming a militia." It is about being armed, so as to having the ability to form a militia, if needed, against a governing body, - which they had just done, - resulting in the birth of the US.
"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."
It means exactly that. We know from other information, articles of the time, etc., that it does mean the citizens have the right to own weapons, to keep themselves free from government tyranny.
"I ask sir, what is the militia? It is the whole people ... To disarm the people is the best and most effectual way to enslave them."-- George Mason (who opposed ratification of the Constitution without the Bill of Rights)
"And that the said Constitution be never construed to authorize Congress to infringe the just liberty of the press, or the rights of conscience; or to prevent the people of the United States, who are peaceable citizens, from keeping their own arms…" -- Samuel Adams, Debates of the Massachusetts Convention of 1788
"Americans have the right and advantage of being armed, unlike the people of other countries, whose people are afraid to trust them with arms." (James Madison:Federalist Paper #46)
*