And nobody here really has any solid ground to defend the US in those instances where they have morally slipped, but nobody has any right to say the US should not have a military because of those instances.
Of course not! Nothing I say here is aimed at influencing career decisions. OP's life choices are their own.
I clearly targeted 2 ostensibly objective statements. One was the creative interpretation of "defense" (attacking a country on the other side of the world even for reasons known to be fabricated cannot be called "defense"), and the second was the attempt to call everything "a gray area" to muddy the waters (thus homogenizing and conflating writing software that tracks the websites you visit with helping train the people potentially dropping bombs on weddings).
Your job choice is yours alone to make. I can only express disagreement if I were to make it for myself. But I can certainly have a strong objection to redefining or twisting facts to justify that choice. That's not only a transparent attempt of making the choice more palatable in the eyes of others but explaining it like that ironically has the opposite effect.
Imperial armies are both useful and immoral. It's not that it's american that makes it bad, its that it's job is empire
Are you against the U.S. military in particular or all militaries? This part makes me think the latter.
I don't think it's all that controversial or ethically dubious to believe, in general, that militaries need to exist and that they therefore need to train their members on how to operate weapons.
More specific arguments against particular militaries and particular weapon systems are more interesting.
At any rate, some of the "things" that militaries achieve are good, necessary and, arguably, properly achieved by violence and the threat thereof. Such as protection from external threats of tyranny (surely we can all think of one contemporaneous tyrant with a military?).
That means, I think, involvement in conventional weapons systems for some military can be fine. In the case of the U.S. military, I could see objecting in particular, but I wouldn't predict any real impact to U.S. foreign policy due to that sort of personal choice. The main benefit would be on a personal and, depending on the circles you travel in, social level.