The states' rulings could have implications for his 2024 bid, but the Supreme Court is expected to weigh in.