The
only major clash between
US-led forces and
Afghan Taliban occurred in Afghanistan during the period (October 2001 - June 2002) when Afghan Taliban were controlling 90% of Afghanistan including Kabul.
FYI:
https://www.rand.org/pubs/research_reports/RR381.html
And US-led forces utterly humiliated Afghan Taliban in this particular clash.
"U.S. forces were surprisingly successful in toppling the Taliban. The rigorous preparation of SOF clearly paid off. Air-land operations were decisive. Small-unit soldiers and leaders passed the tests of the harsh Afghan environment. Force protection, logistics operations, and communications each worked well."
After that clash, remnants of Afghan Taliban fled to Pakistan and Iran in order to regroup and bid their time. When US-led forces withdrew from Afghanistan in large numbers in 2014, Afghan Taliban re-surged soon after with a fresh bunch of fighters and took parts of Afghanistan by storm once again. Although US-backed Afghan government have held its ground since the resurgence of Afghan Taliban (2015 and onwards), it is not up to the task of expanding its footprint across entire Afghanistan due to internal corruption and unreliable ANA. This dynamic have frustrated US actually.
US was more interested in sorting out the matters of Middle East and Africa than Afghanistan. However, US did manage to eradicate Al-Qaeda Network across Afghanistan and Pakistan by 2011, and helped Pakistan in clearing its lands from TTP via numerous drone strikes (the first of its kind in history).
There is no such thing as "yet it took 17 years and still no victory in Afghanistan" - complete misreading of developments in Afghanistan. US-led forces utterly humiliated Afghan Taliban and pulled off 'regime change' in Afghanistan in a span of few months (October 2001 - June 2002). However, Afghan Taliban re-surged in 2015
after US-led forces withdrew from Afghanistan in large numbers in 2014.
What do you expect US to do now? Invade Afghanistan again?
American military is very strong and capable, and will deliver results in any theater, but it is up to American politicians to make the most out of these accomplishments in the aftermath,
but sometimes they do not.