Killing of civilians in warfare is not permitted in Islam, neither is cutting down of trees, killing of animals, or destruction of infrastructure. But killing American soldiers when they invade your country, rape your women, install tyrants, support occupiers (like Israel, China, and India), etc. is not supposed to be haram just because the non-Muslim Americans feel it should be.
Point of clarification- are you talking about fighting the US military with another military? Or are you talking about some other things well outside of that scenario, like a militia (regular or irregular), or perhaps you're even trying to excuse the violent acts of random civilians who don't take kindly to the presence of US soldiers in their country?
Let's take Iraq as an example. Actually, Iraq is a great example for a side by side comparison. US troops are in Iraq with the permission of the Iraqi government, and are working closely with the Iraqi military especially the Golden Brigade. Turkey, on the other hand, insists on having some of their troops stationed right near Mosul and are determined to take part in that battle no matter what Iraq says- and the Iraqi government is dead set against this, they're really upset about Turkey having its troops there. So my question to you is this. In this side by side comparison, what are the acceptable things that Iraq ought to be able to do in order to expel the military forces of foreigners from their country? (In terms of what is haram and what is not, of course).
Example One. The US military has the backing of the Iraqi government, so the Iraqi government obviously isn't going to expel them. But if some regular Iraqi people don't want the US military to be there, do you support them in trying to expel the US military? If so, by what means exactly? Would they need to be somewhat organized in a movement that seeks to overthrow the existing government, or would you also support random acts of violence by anyone who happens to be angry? Would you support the violent acts of Muslims from outside Iraq, who go to Iraq for religious sectarian reasons, and attempt to kill or expel the US forces because...for example...these are Sunnis that are concerned about undue favor being shown to Shia? Do you draw the line there, or is that acceptable to you as well?
Example Two. Turkey's military forces acting without the permission of Iraq's government, in Iraq. This time, the government of Iraq- which is trying to control its borders- does not want Turkey's military to be there. So, according to you, what options are available to Iraq as a country and to regular Iraqis as citizens? If able, and when able, should the Iraqi government and military force those soldiers out, perhaps with the help of some allies? Is this the only course of action that Iraq ought to limit itself to, or are there some other potential courses of action? For example- there actually are some militias that aren't really being allowed to fight in Mosul as much as they'd like. What if they went after the unwanted Turkish forces, would you be okay with that? What if it was just some random violent civilians that aren't organized in any way, do you support violent acts by regular civilians against foreign forces in this type of situation or do you want them to refrain from such violence? And finally, suppose a Muslim, or maybe a bunch of Muslims, travel there from outside Iraq with the purpose of helping Iraq carry out its will and expel the foreign army from its land. If we hold on to the assumption that they are indeed acting in the interest of Iraq, and according to the will of what Iraq wants the outcome to be, do you support that course of action?
I look forward to seeing what your responses are, and I hope you can tell me why you reach your various conclusions in some more detail.