I think that the lives of soldiers given in battle are never worth it, in the sense that there's nothing they buy their country or people that was worth even a single human life. No amount of territory, wealth, power, etc. Nothing's comparable. And I agree that warfare represents a failure to resolve problems by other means, and as a failure it ought to be avoided to whatever extent is acceptable.
But that word, "acceptable" is an important one. It isn't, "possible". There are situations where war is not the greatest possible failure, and the value in a soldier's death is that they fight and die so somebody else doesn't have to. There is the cynical view that "somebody else" here means a politician or general, which is probably true to an extent, but I think that from the soldier's perspective that "somebody else" is a friend, a sibling, a spouse, a child, and that perspective is the one that gives worth to the sacrifice. I think it would be better if nobody could give the orders that make those sacrifices happen without understanding that perspective, but there's a lot of ways I think that the way our species handles violence could be better.
And then there's politics. Situations where the willingness to go to war can prevent that very war by changing another actor's course. Situations where things don't go the way they should've, where mistakes cost people lives. That sort of thing. Where lives really do get used as a cold sort of currency, and I'd like to believe (but can't) that the goal is a positive balance. There's a big gray zone of fuzziness where I have to accept that sometimes those decisions might save lives by spending them, or that maybe "lives saved" might not even be the most important metric compared to things like "quality of life", and so on. Even given that, of course, I don't think that means you can justify any decision by appealing to that - all that says is that it was acceptable to make a choice of some kind, it doesn't justify the particular choice that gets made.
I'm kind of rambling. The short version is, I think it can be worth it, but it usually isn't. Strife, I want to thank you for being able to take that risk, for being able to hope that if your life is spent in service, it will have been one of those rare deaths that occurred in the context of making the world a better place. You're a stronger person than I've ever been, for that. You're a pretty cool dude.