As differentEllen points out, it has been asserted time and again that these individuals are not POWs, nor have they been treated as POWs. Remember that in our most recent wars - Korea, Vietnam, WWII, once a sovereign government was established in the nation we were once at war with, we released all the POWs within a year.
In the case of Afghanistan and Iraq, the Bush administration desperately wanted to avoid the political (and legal) consequences of being seen as an occupying power in both Iraq and Afghanistan. And they wanted to show that their pre-war planning of "no more than 6 mos" was accurate (also for political reasons). So what they did was to stand up weak, unstable puppet governments, and convey upon them full sovereignty long before those governments were able to assume that sovereignty.
So that has left the USA in a very untenable position. We are no longer "at war" in the region under any definition of that term. What we ARE doing is supporting an allied government against a domestic insurgency. That is NOT a war. And as such, we have no legal basis for holding POWs in such a circumstance.
Legally only the Iraqi and Afghani governments can hold the POWs. But of course that too would be politically untenable for this administration. So their unwillingness to think through the issues, and their rush to avoid the consequences of their mistakes has dug us in deeper and deeper into a legal Catch-22 wrt those we detained on Gitmo. And there is no good way out.
What I predict will happen is that they will continue to be held on what amounts to Writs of Attainder (accused and sentenced for a crime arbitrarily created by the Executive). Eventually this will come to yet another appeal to SCOTUS on habeas and Writs Of Attainder grounds. SCOTUS will rule against the then Democratic administration, which will be all too happy to transfer these prisoners back to the Afghani and Iraqi governments, who will promptly execute them summarily.