The judgment overturns the Kennedy Declaration, which has forced 40 hospitals to drop gender affirming care for minors.