Wrong question, wrong assumptions. We may have troops in Afghanistan, we are not at war there. Afghanistan has been locked in several different insurgency driven civil conflicts ever since the Russian invasion in '79, and we are responsible for inflaming the first set of these after the Soviets left in '89. We chose to make the Afghans cannon fodder in our Cold War with the USSR, chose to arm and train the most militant and violent in the region to harry Russia, and then abandoned the population to the armed and trained militants when Russia withdrew.
Most experts on insurgency and civil wars think that it takes about 20 years to wind down the asymmetrical tactics of the insurgents, to reestablish civil order, and this scenario seems to apply to the Afghans. The Taliban looks to be tiring of endless conflict, in the interim women and girls have emerged from the brutal Taliban oppression of their rule. some degree of normal life has returned to Afghan cities, a settlement may well be in reach that finally brings some degree of peace to the nation. Withdrawing our troops now won't help in the possible resolution.