U.S. District Judge Alvin Hellerstein’s ruling upends the Republican presidential nominee’s plan to move the case to federal court.