According to the Geneva convention the answer is yes. That about sums it up. All thats left is a humanitarian consideration. Again we could have killed them long ago and treat them better than they deserve.
Considering a number have already been released, it seems that the people at Gitmo are not 100% worthy of this treatment and death.

Iff they are guilty it maybe better treatment then they deserve to live for them, it would be worse treatment to yourself to kill them.