Afghanistan is Americas problem; they created it and now they are forced to live with it.
.
Invading a country has long term ramifications, and the Americans are trying to force those costly problems on it's allies.
.
America will have to stay, and pay, in Afghanistan for as long as they don't want the Taliban to control it, so if they stay 20 or 50 years, when they leave the Taliban will still assume control.

You would have thought that Viet Nam would have taught them a lesson.