Judge rules against advocates trying to help migrants sent to Guantanamo and to stop more transfers