I don't think the Korean war was a war we won. An armistice was called between SK, NK, China and the US to stop fighting. And we were in SK much longer than 20 yrs, to keep NK at bay, even to this day. The reasons to stay have grown in strategic ways, but the fact remains, we've never left.
I'm not defending Afghanistan, just pointing this out.