A group that successfully challenged affirmative action at the Supreme Court had also sued the military academies. But the judge said “the U.S. Naval Academy is distinct from a civilian university.”