This exact situation was navigated by none other than Jesus. The last time he entered Jerusalem, the Pharisees were trying to locate Jesus so that they could let kangaroo justice run its course and get him killed. They enlisted the help of the Romans, who governed the city, making finding Jesus a government imperative, which Judas obeyed. Yet there are few who regard Judas' actions in providing the governors this bit of intelligence as the right thing to do.
Soon thereafter, Jesus was being interrogated in court by Pontius Pilate and also Herod, where he exercised his right to remain silent. Unlike with Judas, I can't think of anybody who says he was doing something wrong by remaining silent under this questioning.
The relevant Commandment (of the ten) is "do not bear false witness". I think people who are troubled by these paradoxes overlook the word "bear". By not speaking, Jesus doesn't incur the burden of proof or shirk his obligation to tell the truth.
From this paper written about Kant's position on the matter, we read that according to Kant,
. . . if you have by a lie prevented someone just now bent on murder from committing the deed, then you are legally accountable for all the consequences that might arise from it. But if you have kept strictly to the truth, then public justice can hold nothing against you, whatever the unforeseen consequences might be. It is still possible that, after you have honestly answered “yes” to the murderer’s question as to whether his enemy is at home, the latter has nevertheless gone out unnoticed, so that he would not meet the murderer and the deed would not be done; but if you had lied and said that he is not at home, and he has actually gone out (though you are not aware of it), so that the murderer encounters him while going away and perpetrates his deed on him, then you can by right be prosecuted as the author of his death. For if you had told the truth to the best of your knowledge, then neighbors might have come and apprehended the murderer while he was searching the house for his enemy and the deed would have been prevented. Thus one who tells a lie, however well disposed he may be, must be responsible for its consequences even before a civil court and must pay the penalty for them, however unforeseen they may have been; for truthfulness is a duty that must be regarded as the basis of all duties to be grounded on contract, the laws of which is made uncertain and useless if even the least exception to it is admitted.
To be truthful (honest) in all declarations is therefore a sacred command of reason prescribing unconditionally, one not to be restricted by any conveniences. (page 3 of the pdf)
So according to Kant, Judas avoided the guilt of lying. But I'm not convinced that Kant would acquit Judas... after all, he was not obligated to get up from dinner, walk across town, and make an arrangement with the Pharisees as to how they could find Jesus. In contrast, Jesus didn't "tell the truth" under questioning, but he was truthful in all declarations, as required by Kant.
There should therefore be no trouble applying Kant's ethics to the subject paradoxes... just don't answer the question. Die first, but don't answer the question.
Reference: Journal of Social Philosophy, Vol. 41 No. 4, Winter 2010, 403–421. "Kant and the Murderer at the Door... One More Time: Kant’s Legal Philosophy and Lies to Murderers and Nazis" by Helga Varden PDF LINK