The thing with defamation is it's rarely a black and white situation even in the UK, and the US is even more murky because of the 1st Amendment.
It's also tough because you have to prove reputational harm, not just that the statement is not true. And if the comment was published in the US to a US audience expecting comedy and satire then it would be hard to prove reputational harm - for the US audience jokes about a UK prince are not going to significantly damage his reputation in the USA, and it would be difficult to prove that Stephen Colbert's TV joke harms William significantly to people in the UK.
The lawyer who approved the copy for that joke would have weighed up that a) William would be very unlikely to sue, and b) if he did they'd have a very good chance of winning based on the above.