Justices rule against detained immigrants seeking release