This is absolutely the correct decision for the Supreme Court to make. You do not get to use US law against the US when you're not even inside our country like that.
That said, whether or not the Mexican government should demand he be extradited to Mexico for homicide charges is a different...