WASHINGTON — The Supreme Court on Thursday ruled by a 5-4 margin that nearly half of Oklahoma is an Indian reservation in the eyes of the criminal-justice system, preventing state authorities from prosecuting offenses there that involve Native Americans. The decision was potentially one of the most consequential legal victories for Native Americans in decades. It was written by Justice Neil Gorsuch, a Westerner who has sided with tribes in previous cases and joined the court’s more liberal members.