If you are in the military and you are Catholic, and you have to take a life, is that considered a mortal sin?
Because you elected that career knowing that it might be necessary. That falls under justifiable homicide (cf. 2263 & 2321). For example, David killed Goliath - that was justifiable homicide (1 Sam 17:1-51)