“If it was, there was no need to mention militias.”
Wrong. There was no standing army, & the founders did not want a standing army. The militia was We The People - able-bodied citizenry prepared to be called to duty should the need arise.
Besides, the key phrase is ‘the right of the people’. You might want to do a search on the internet for “The Unabridged Second Amendment” by J. Neil Schulman.
He consults a linguistics expert? Sorry. I'd rather accept established U.S. Supreme Court cases when it comes to constitutional interpretations of the second amendment.
"Besides, the key phrase is the right of the people."
True. It's key because it reads "the people" -- not "all persons" or even "all citizens".
Who were "the people" for whom this right was protected? If you get that answer correct, then you're on your way to properly interpreting the second amendment.