Funny stuff in an abstract way since you used nation building in the same post. We had a chance for nation building in Iraq but didn't go all the way with it nor the right way. Hope we do not abandon the Kurds and it was a shame we did not divide the rest into Shia and Sunni lands with our own puppets. Then we might have had nation building with fewer boots on the ground and no patrols as well with a hope of ending the holy wars by starting a real women's rights movement in that nation for starters.
It's highly likely that we will have a military presence in Afghanistan for at least several more decades, unless Afghanistan's government is successful in convincing everyone to leave. Good luck with that. America will almost certainly want to maintain a few bases there, and the Taliban will most likely regain control within a year or two of our "pullout". America will also continue to spend insane amounts of money there, for our military and the newly trained Afghan armies... some of whom will surely attack American bases. Guerilla-styled warfare is going to continue indefinitely. The correct action would have been to eliminate Bin Laden when we had the chance and leave the country. That was in the late 90s. After 9-11 America had several more chances to take him out and leave the country... but instead the goal changed from killing Bin Laden and leaving the country alone to removing the Taliban from power, since they were harboring him and his followers. Once that decision was made any plan to leave the country became mired in logistical and political nightmares. We can still leave the country alone to it's fate, but it's unlikely that we will. We're stupid that way.