Retirement tax questions

Having qualifying  wages is the only limitation to putting money into a 401K ... your citizenship or place of residency is immaterial.