A divided Supreme Court ruled that the Trump administration must pay out nearly $2 billion in foreign assistance funds to nonprofit aid groups.