A federal law, the justices ruled, does not require immigration judges to consider whether immigrants may be released while their challenges are pending.