Despite the fact that the word citizen does not appear in the Second Amendment.
Back when our founders wrote the BOR, it was understood that ‘the people’ referred to the citizens of the nation, and not foreign diplomats, &etc.