You mean Article I sec 10:3:
No State shall, without the Consent of Congress, lay any Duty of Tonnage, keep Troops, or Ships of War in time of Peace, enter into any Agreement or Compact with another State, or with a foreign Power, or engage in War, unless actually invaded, or in such imminent Danger as will not admit of delay.
This clause refers to standing active duty troops, like those of the federal governmet, not militia. Militia and "troops" are seperate concepts, as can easily be seen in Article I sec 8 in that it is clearly dealt with seperately from the standing military.
In any event, 2 things:
1- The 2nd Amendment protects the right of the people, and therefore the restriction in I-10: woudl not apply;
2- The 2nd Amendment modifies and superceedes any relevant portion of the Constitution already in place at the time of its ratification,