How do you measure Success or to some extend, failure? In a war?
From a long time ago, war does not just serve a single objective, thats why we have strategic and tactical objective in any giving war
So when you look at a certain aspect, yeah, while it is true that something seems dont change and its look a lot like a failure.
Indeed the afghanistan government is still weak even after 14 years of occupation, but thats the afghanistani own provision isnt it. No matter how hard American tried, there are no way they can protect and strengthen a country beside telling them what to do and helping them on the way, but when it come to the end of a day. you still need that country (afghanistan) to take initiative to take charge on their own country simply unless US wants to annex afghanistan and controk them as in their 51st state, they are the people for their government, not the American.
In the end of the day, this war belong to anotherbcategory, thats "Have to do" category.
Now ask yourselves this did afghanistan and pakistan better off livijg with Taliban controlling afghanistan? If you answer is no then, the US war in afghanistan would be a.success. Cos someone need to make initative, in this case the US does it