A federal judge in Boston who has served for more than 35 years retired from the bench, effective Sept. 16, according to a statement from the court.