Timing is a problem. Kennedy can’t retire now until after this October decision. I don’t think Trump will be able to get through a SCOTUS pick by October.
He can retire any time. They haven't heard this case yet, they just granted cert. If Kennedy retires today then a new justice will hear and vote on it.