He concludes that because he assumes what the judge said is true. If we assume that, we must reject the scenario where he gets executed without surprise.
Actually, you're right. However, the paradox arises no matter what the prisoner concludes. If he concludes that the hanging won't be a surprise, he will be surprised by the outcome (the knock on Wednesday).