Do you truly believe that? In a war of extinction you feel the moral choice is to allow humanity to be exterminated instead?
Surely inaction is just as morally unjust as action? I do not believe that not switching the train onto the track which doesn't kill someone is different from switching it onto a track which does.
In more direct terms I, for one, would feel no guilt killing to save my own life from an aggressor, or to save those of my family/friends.