In the vernacular of the day, "well regulated" meant trained in the use of your firearm and keeping it maintained.  The intent of the 2nd Amendment was as a final check against tyranny by the government by guaranteeing that "the people" would always have more arms than any standing army the government could raise.  To allow the government to "regulate" the people to that end would contradict the reason the 2nd Amendment exists.

In the US Code, the "Militia" consists of two parts: (1) the organized militia = the National Guards; and (2) Every other male between the ages of 17 and 45; all veterans, and women and older people who volunteer to be a part of it.  It's the legal basis for the draft.  It is your duty as a citizen to be armed and "well regulated."  We only enforce that duty during war time.