A military court initially convicted and sentenced Berenson to life in prison for treason .