The USA won that war — it’s the peace which they’re struggling with, and that’s a very different thing. Doubly so when you’re trying to install a friendly democratic government and the only reason your troops are still there is to support that new government — what would have happened (politically) if the French had kept troops in the USA after the war of independence?
Police and soldiers (should) have different goals and tools.
It's semantics, but I don't think "there are people actively attacking our military, and we are struggling with peace" really counts as "winning the war". But I agree that military is probably not the most effective way to achieve progress at this stage.