Earlier quoted context omitted.
The second amendment is one of the few exceptions rather than the rule. It is difficult to argue for inclusion in "the people" who have the right to bear arms when excluded from selective service and from the definition of the unorganized militia.
By your logic women unaffiliated with service are excluded then. The unorganized militia, by US code, is (you can look up the code but this is pretty close) basically able bodied military age male citizens. Throwing in all these constraint when the constitution clearly say "the people" without qualification which magically means basically everyone one place but not most everyone somewhere else seems kind of arbitrary…
At least the 7th circuit agrees with you, (United States v. Meza-Rodriguez) even if there are other federal appeals circuits that don't. So this is something that will likely go to the Supreme Court eventually.