The men of Nineveh will arise at the judgment with this generation. This is the indignity: first, the gentiles are preferred; secondly, the reason (v. 43).
Note that a person is good, either because he does not sin or because he repents. First, therefore, he prefers those who have repented, namely, the gentiles; secondly, those who have sinned (v. 42).
The Lord had compared his resurrection to Jonah; therefore they could believe that it would happen to them as to the Ninevites, who were set free. But the Jews were not only set free, they were dispersed. Hence the men of Nineveh... In these w...ords an error of the Jews is excluded, namely, that the resurrection will occur before the judgment and that in the meantime Jerusalem will be rebuilt. And they appeal to Isaiah (25:6): "On this mountain the Lord will make a feast of fat things." Others said that the just and martyrs will rise one thousand years before the others, and they appeal to Revelation (20:1): "Then I saw an angel coming down from heaven, holding in his hand the key of the bottomless pit and a great chain. And he seized the dragon, that ancient serpent, who is the devil and Satan, and bound him for a thousand years, and threw him into the pit, and shut it and sealed it over him, that he should deceive the nations no more, till the thousand years were ended." Both are excluded when he says, They will arise with this generation, the good and those not good together. And will condemn it, by comparison but not by any authority, because they will rise among those to be condemned: "This is Jerusalem; I have set her in the center of the nations, with countries round about her. And she has wickedly rebelled against my statutes more than the countries round about her" (Ez 5:5). And why will they condemn them? Because they repented; but the scribes and Pharisees were not willing to do penance.
The Lord began his preaching with penance as the theme, as did John, but they did not listen: "No one repents of his wickedness" (Jer 8:6). Furthermore, the others did penance at one preaching by Jonah; but Jesus had preached to them many times, and yet they were not converted: "If I had not done among them the works which no one else did, they would not have sin" (Jn 15:24). Again, the former were converted by the preaching of one prophet; but the latter had not only a prophet but the Son of God. Hence it says in Hebrews (1:1): "In many and various ways God spoke of old to our fathers by the prophets; but in these last days he has spoken to us by his Son, whom he has appointed heir of all things, through whom also he created the world." And he continues: and behold a greater than Jonah here, as in Hebrews (3:3): "Yet Jesus was counted worthy of as much more glory than Moses as the builder of a house has more glory than the house." Therefore the Ninevites are preferred, because they did penance.
Source: Commentary on Matthew