The importance (or lack thereof) of these differences has been the source of debate regarding the meaning and interpretation of [2nd] the amendment, particularly regarding the importance of the prefatory clause. One version was passed by the Congress, and a slightly different version was ratified.Passed by Congress (emphasis mine):
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.
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.
District of Columbia v. Heller 554 U.S. 570 (2008) is the Supreme Court's latest and clearest interpretation of the 2nd Amendment.
The majority's analysis is almost entirely a textualist/original-meaning interpretation.
They took the following to be the text of the 2nd Amendment:
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 capitalization differences were treated as inconsequential in the analysis. The opinion refers to "the phrase “the militia” in the prefatory clause", with no capitalization when mentioning it.
In interpreting the object of "keep and bear Arms", "Arms", the opinion immediately removes capitalization in its own discussion of the term. They even explicitly rule out the possibility that "keep Arms" has any special meaning:
No party has apprised us of an idiomatic meaning of “keep Arms.” Thus, the most natural reading of “keep Arms” in the Second Amendment is to “have weapons.”
The opinion also refers to Vermont's adoption of Pennsylvania's "right to bear arms", calling any differences in capitalization or punctuation inconsequential:
In 1777, Vermont adopted the identical provision, except for inconsequential differences in punctuation and capitalization.
Neither of the two dissents make anything of the difference in capitalization. None of the 68 amicus briefs mentioned the difference in capitalization. It did not come up in oral argument.
The Amendment’s first and third commas signal a pause for breath and can be omitted without affecting the meaning.
They say that the second comma is consequential, but that comma is consistent between the two variants that you quoted.