People who live in the Western, developed countries must re-define at least two concepts when discussing Afghanistan:
1. "Country". Western countries generally are similar, whether democratic or not, in having a leader, legislature, and bureaucracy that, more or less, controls and leads the nation. Afghanistan, on the other hand, since before Alexander the Great, has been a collection of independent tribes and "warlords, and now has a corrupt and impotent "central government". Attempting to deal with problems in this area by hoping to do it through this government in Kabul is doomed to fail.
2."Victory". War between Western, developed countries generally ends at an agreed time, with an apparent winner and loser, or with a truce without winner, but with an end to fighting. Small groups may continue resisting, but most hostilities are over, and a treaty may be signed eventually.
I do not believe such a victory/defeat dichotomy is possible in Afghanistan. Would we agree to a truce with each tribe and warlord individually? What about the Taliban and al Qaeda? Would they disappear back into tribes as they did before, when we "defeated them"?