A judge has affirmed the firing of a former captain with the Nebraska State Patrol after he filed suit last year.