How does anyone define the end of a war? When one side stops fighting and the other obtains its objectives. When the Islamists stop putting us in their crosshairs, we will have won. Until then, we don't hand over our prisoners to those who will re-enlist them to put is in their crosshairs.
“How does anyone define the end of a war?”
How about when you have obliterated the enemy and they cease to exist or they unconditionally surrender?
Do you expect to obliterate all muslims or get them all to unconditionally surrender? Of course not. Impractical if not impossible.