It was rarely a problem to get into Afhanistan in the right season, or to install yourself in power in Kabul.
The historical pattern is that every foreigner was thrown out after some time, even if he felt secure in power in the meantime.

The SF approach in the beginning was indeed successful in turning the civil war, the communities and their militias changed sides like dominos.
But I bet the politicians in Washington and London did never consider to really leave asap, and that was utter stupidity.
The Northern alliance would most likely hold the Taleban away with some support, there was absolutely no need to waste troops and ressources on a highly questionable democratic experiment.