The answer is clear. Go in after the Taliban, and along the way, offer complete financial and medical aid to the civilians. After we're done, do what we did with Germany and Japan. Rebuild their country and build up their economy. Then build/keep a strong military presence there to preserve their freedom.
Once the good folks, who are the majority, are empowered by us, they will not allow another Taliban to control them.