The prisoners who were released from Gitmo by the military under the Bush administration were released because they were low-level operatives. They were people like drivers or cooks, who took those jobs because they needed the money. I believe that one of the people released was actually Osama Bin Laden's personal driver.
They were released because there was no proof that they had ever taken up arms against Americans, or had ever fired a shot or engaged in any violent activity.
They were not released because of technicalities like the "Miranda rule" or a "jury of their peers" -- which are red herrings that totally don't apply to this situation. Don't expect to hear anyone try to apply those concepts here because it won't happen.
As to those Gitmo detainees who are about to be tried in New York, the first motion their defense counsel will probably make is for a Change of Venue. Why? Very simple. Their lawyers know that, if these folks are tried in a civilian court in New York, they are dead ducks.