Wa`alykum as-Salamu wa Rahmatullahi wa Barakaatuh.
There is nothing in the authentic sources of Islam to rule that a woman cannot become a judge or join the army as long as she is not forced to rule against the explicit commandments of Allah.
The same applies to men occupying such positions as well. While saying this, it should be known that most of these countries have constitutions that guarantee freedom of conscience.
So, even while serving in the army, one could excuse oneself from participating in wars of aggression and occupation, which cannot be justified in Islam. Islam only allows us to defend ourselves when attacked or oppressed.
For further details, you may refer to detailed answers on this topic posted on this site.
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.