I would say in most cases it is not immoral because morality implies an informed decision. Most who enlist do so from a sense of indoctrinated obligation, a belief that the military provides society a useful service, and ignorance of what the organization actually does. Now, if the individual was actually aware of the activities the organization was involved in, then the morality would depend on the nature of those activities and on another philosophical principle:
Do ALL members of an organization bear partial responsibility for the evil done by that organization? To take the most extreme (albeit cliched) example, presumably the Nazis had accountants. Are they all evil by virtue of working for the Nazis? I’m not even talking about shady accountants, appraising stolen art or hiding funds from investigators. Just a payroll clerk, who works hard and just wants to make sure the troops all get paid correctly . . . Nazi troops, though. Look, government jobs are very stable, pay well, and doing good work in payroll keeps one out of the field.
I don’t think that the U.S. Army is as bad as the S.S. was. But, I wouldn’t call dropping drones on wedding parties, training Al Quaeda, overthrowing representative democracies, trafficking heroin, and arming Islamo-fascists “ethical”. So the question is, “how large a part can you play in this kind of organization and keep you hands (and conscience) clean?”. America has pretty much decided that if you get school children to face the flag every day, recite the pledge, support the troops, and repeatedly tell them that we’re the freest people on earth, most 18 year-olds won’t answer that question, or even think to ask it.
I can’t control what my grown children will do, but they are fully aware that enlistment would not have my blessing or result in any show of support or encouragement whatsoever (the exception being for my son, should he join the Foreign Legion, as he could become a citizen after five years of service).
In stark contrast to the U.S. military-welfare complex, joining a military protecting a free people from actual threats is not only ethical, but honorable.