Obama simply did not want to put pressure on Democrats in Congress to vote for the prisoner exchange because he knew that it would jeopardize the November election and he didn’t want to face the humiliation of being voted against by members of his own party.
It would not have been up for a vote.