Our Failure in Afghanistan Isn't Military but Historical
We need to accept an uncomfortable reality. The Taliban WILL take over Afghanistan. That was always the inevitable outcome. A committed insurgency will outlast an occupying force every time. There has never been an instance in history when this wasn't true.
And of course, we all seem to have forgotten that the Taliban evolved from the same Mujahideen who defeated and ousted the mighty Soviet military in the '80s (with aid from the U.S., I might add).
When people say Afghanistan is this generation's Vietnam, it really is an excellent analogy. Just as with Vietnam, we chose to oppose a government we didn't like and install a Vichy-type regime that was friendly to us, but which was inevitably hopelessly corrupt and weak.
That once again we've proven ourselves to be incapable of learning the lessons of history is no one's fault but our own.