Now I am not a fan of John McCain as a Senator, but his service to this country is unquestioned and there is no comparison between the two.
In mid-1968, John S. McCain, Jr. was named commander of all U.S. forces in the Vietnam theater, and the North Vietnamese offered McCain early release because they wanted to appear merciful for propaganda purposes, and also to show other POWs that elite prisoners were willing to be treated preferentially. McCain turned down the offer; he would only accept repatriation if every man taken in before him was released as well. Such early release was prohibited by the POW's interpretation of the military Code of Conduct: To prevent the enemy from using prisoners for propaganda, officers were to agree to be released in the order in which they were captured.
On the other hand Berdahl deserted, and at least six and possibly more soldiers died looking for Bergdahl after he went AWOL, and possibly gave aid to his captors.
Thankfully McCain was smart enough to avoid the trap.