The United States of America has had a historical policy that they do not "negotiate with terrorists".
How was brokering a trade of POWs between opposing sides of the War on Terror possible without deviating from this policy?
Question assumes that:
Not negotiating with terrorists is an actual policy the U.S. follows (it's not*)
That the standard conventions of war should not be applied to the Taliban (who the U.S. declared war on in 2001), just because the political designation of "terrorist" is in play
I propose that "not negotiating with terrorists" is a political tool to attack opponents more than an actual standard to govern by, and as such isn't suitable to actually adhere to.