Scholars have long thought Jonah was a “type” of Christ, meaning Jesus’ story imitates/reverses the story of Jonah on many issues, and presents Jesus as greater than Jonah.
Matthew writes:
“38 Then some of the scribes and Pharisees said to him, “Teacher, we wish to see a sign from you.” 39 But he answered them, “An evil and adulterous generation asks for a sign, but no sign will be given to it except the sign of the prophet Jonah. 40 For just as Jonah was three days and three nights in the belly of the sea monster, so for three days and three nights the Son of Man will be in the heart of the earth. 41 The people of Nineveh will rise up at the judgment with this generation and condemn it, because they repented at the proclamation of Jonah, and see, something greater than Jonah is here! (Matthew 12:38-41)“
The difference between the people of Nineveh and those of Jesus’ generation was the people weren’t repenting in Jesus’ time, and so since the end was soon something needed to happen to save as many as possible.
We can see imitations and reversals of the Jonah Story were used to form the story of Jesus. For instance, we read
Jonah as a type of Christ:
(1) Both received a mission from God to go preach. However, Jesus obeyed the Father willingly while Jonah refused at first and only obeyed reluctantly after God let him pout inside a fish.
(2) Both went down to Sheol for three days (Jonah 2:2). Jonah’s experience was more like extreme discomfort (in addition to it being against his will). Jesus went to his death willingly in obedience to the Father and in love for his people.
(3) Both were delivered from their trip down to Sheol, but Jesus was resurrected and offers that same resurrection to whoever would follow him. Jonah was merely spat out of a fish and offers a half-hearted sermon on repentance.
(4) Both preached a message exhorting people to repent in the face of impending judgment. Jonah preached the bare minimum and had no power to save. Jesus preached relentlessly for years and had the power to forgive sins.
(5) Both saw sinners repent and believe in God for the forgiveness of sins. Sadly, Jonah hated the Ninevites and didn’t want God to have mercy on them. Jesus, our Good Shepherd, rejoiced when sinners (especially Gentiles) repented and believed.
(6) In dramatic fashion, Jonah selfishly wished for death to escape his discomfort and to avoid seeing his enemies enjoy God’s mercy. Jesus, in quiet obedience, endured torture and death intended for sinners in order to save them from Hell.
(from https://preachingsource.com/blog/the-christ-connection-in-jonah/)
What is the moral of the story of Jonah? No person can sink so low as to be beyond forgiveness. As a prophet of God, Jonah had sunk about as low as he could, but God would still forgive him. Nineveh was wicked enough that God intended to destroy it, but He could still forgive them. The primary theme of the story of Jonah and the huge fish is that God’s love, grace, and compassion extend to everyone, even outsiders and oppressors. God loves all people. This story is the exact opposite of how many conservative Christians understand God: that God couldn’t forgive and so Jesus needed to die. This conservative interpretation clearly makes no sense in a Jewish context.
One key to the Jonah story is that Jonah laments the successful teshuva/repentance of Nineveh, but this this terrible rejection of God’s will paradoxically encourages the reader to their own teshuva/repentance, specifically to overcome the desire we have to self-righteously criticize Jonah for being callous, clueless, etc, because we can see Jonah’s failings in ourselves: (see https://www.myjewishlearning.com/2014/09/29/our-prophets-ourselves-jonah-judgment-and-the-act-of-repentance/).
And this is exactly the point of the Jesus story. It is seeing the vileness of those who wrongly executed Jesus in ourselves that inspires repentance. Penal substitution simply doesn’t work. Executing an innocent child in Africa for the crimes of a criminal in Texas simply doesn’t serve justice: God thinks you deserve to die but, no worries, because God is going to take it out on a little innocent animal. And, contra penal substitution, if repentance is acceptable for new sins, why isn’t it acceptable for old sins. And what has the average moral unsaved person ever done that warrants the punishment of death for their lack of belief sin?
Rather, we see in the penitential psalms God is a God of forgiveness, not punishment. These psalms declare that God can’t resist a repentant heart. He accepts a humble and contrite heart (Ps 51:19). In your repentant fear of Him, He wants you to be confident that “with [Him] is forgiveness” (Ps 130:4).”
For the first Christians the True Holy of Holies storing the Law is our heart: Jesus inaugurating the kingdom as he changed hearts of men one at a time (Lk 17:21). This done by Jesus un-covering (aletheia, truth) the hidden law written on our hearts through discovering ourselves in those who tortured and killed Jesus, and letting this law shine through (Rm 2:14-15; Jer 31:33-34). Why? As the saying goes, but for the grace of God any one of us could have been the inflamed crowd, corrupt religious elite, or indifferent to Justice Pilate, all who wrongly sent Jesus to his death. Walk a mile in the other person’s shoes and see the log in you own eye before criticizing (cf Matthew 7:5).