I am sympathetic your outrage — but I think you're insufficiently cynical if you can't figure out why he's stuck in that concentration camp despite everyone agreeing he's innocent.
To release him now would be an admission of comprehensive institutional failure at every level -- from his initial capture, through mis-identification, rendition, torture and ongoing imprisonment. The longer the error persists, the worse it gets, and the harder it becomes to admit it's all a horrible mistake. Nobody in the US government institutions that maintain his imprisonment will benefit from admitting it was all a mistake: to the military he's an embarrassment, and to the politicians, releasing him would be handing ammunition to their electoral rivals. (Democracy has failure modes: this is one of them.) So it'd be far better for everyone concerned if he'd quietly die of natural causes so they could bury him and the controversy at the same time.
(Finally, a really cynical part of me thinks that maybe keeping an innocent bloke in jail for 17 years is expedient to a certain part of the US foreign affairs establishment because it sends a message to everyone outside the USA, world-wide: "we can fsck you up on a whim and there is nothing anybody can do about it." In other words, it's dominance signaling. See also the case of Nazanin Zaghari-Ratcliffe, imprisoned in Iran, for example.)