In the last 2000 years the Afghans have handed every invader their asses. We could beat them, but you need the will to do it.
I don’t consider us to be an invader or an occupier. And we have prevailed militarily and are beating them now. The question is how long do we want to remain there to ensure that our objectives are met, and more importantly, how much force and resources do we wish to use to achieve it. There is no way the Taliban is going to hand us our asses unless we allow them to do so. It took the Brits 12 years to defeat the Malaysian Islamic uprising.