"Trump's calling him a traitor ..."
May have had the opposite intended effect. It may have caused the judge to NOT send Bergdahl to prison to show that Trump is not going to tell the judiciary (military or civilian) what to do.
I understand the sentence will be reviewed by the military's appeals system. I don't know if that appeals court or panel can tell the judge that jail time is necessary.