This was convincing at first. But this logic problem is predicated on the notion judges do not conceal their intentions (iow that his initial statement is True). There is just no point in even considering the question if the prisoner isn't actually going to be executed.
I should clarify. The judge is not necessarily "lying" (i.e. making a false statement). He's making a statement which has no bearing on the future. The judge's statement could end up being True or False. Using that interpretation resolves the "paradox".
The question encourages you to start from a flawed premise to begin with. Why must the judge's first statement be True? A judge cannot guarantee how someone will feel the future. Further, why must the prisoner be surprised at the date of his execution? If the prisoner is not surprised at his date of execution, that is also a logically consistent situation.
The question tries to shoehorn you into an irreconcilable input state and output state. Yes, it is a paradox if you assume the question's implied start and end result. However if you remove the limitations implied by the question, in the bigger picture there is no paradox.