Jer 22.1-30 is a prophecy that related to an earlier time (before Chapter 21) concerning the sons of Josiah (Yehoahaz, Yehoikim, Yeconiah). There is a prophecy in this chapter that directly relates to the virgin birth of Yeshua.
v 1…Thus says the Lord (Yehovah), “Go down to the house of the king of Judah and there speak this word,
v 2…and say, ‘Hear the word of the Lord, O king of Judah, who sits on David’s throne (in his place, as his successor, one in whom they should follow as an example), you and your servants and your people who enter these gates (of the king’s palace).
v 3…Thus says the Lord, “Do justice and righteousness (as defined by the Torah), and deliver the one who has been robbed from the power of the oppressor. Also do not mistreat or do violence to the stranger, the orphan, or the widow; and do not shed innocent blood in this place.
v 4…For if you men will indeed perform (do) this thing (Hebrew “ha davar” or this word), then kings will enter the gates of this house, sitting in David’s place on his throne, riding in chariots and on horses, even the king himself and his servants and his people (the blessings that could have been).
v 5…But if you will not obey these words, I swear by myself (there is no one higher),” declares the Lord, “that this house (royal house) will become a desolation.”
v 6…For thus says the Lord concerning the house of the king of Judah; “You are like Gilead to me, like the summit of Lebanon (beautiful, fruitful); yet most assuredly I shall make you a wilderness, like cities which are not inhabited (barren).
v 7…For I shall set apart destroyers against you (Babylon); and they will cut down your choice cedars (sons of the kings, nobles and princes, great men at the time) and throw them on the fire (of judgment).
v 8…And many nations will pass by this city (after it is destroyed); and they will say to one another (as they travel by), ‘Why has the Lord done thus to this great city?’
v 9…Then they will answer, ‘Because they forsook the covenant (Torah) of the Lord their God and bowed down to other gods and served them.’
v 10…Do not weep for the dead or mourn for him (Josiah who was killed by Pharaoh Necho-2 Kings 23.28-30), but weep continually for the one who goes away (Yehoahaz who was about to be taken to Egypt); for he will never return to see his native land (he died in Egypt-2 Kings 23.34).
v 11…For thus says the Lord (Yehovah) in regard to Shallum (one of the names for Yehoahaz-2 Kings 23.30-34) the son of Josiah king of Judah, who became king in the place of Josiah (for three months) his father, who went forth from this place, “He will never return there (to Judah, but this also alludes to eternal punishment and the second death of the wicked);
v 12…but in the place where they led him captive, there he will die and not see this land again.”
v 13…”Woe to him (Yehoikim the reigning king) who builds his house without righteousness and his upper rooms without justice, who uses his neighbor’s servants without pay and does not give him his wages (he is enlarging his house and that is why attention was given to it in v 1),
v 14…Who says, “I will build myself a roomy house with spacious upper rooms, and cut out its windows, paneling it with cedar and painting it bright red (for a proud show of splendor at the expense of others).’
v 15…Do you become a king because you are competing in cedar (making a show of prosperity)? Did your father eat and drink (yes, having his needs met), and do justice and righteousness (yes)? Then it was well (Hebrew “tov” or good) with him.
v 16…He (Josiah) pled the cause (case) of the afflicted and needy; then it was well. Is not that what it means to know me (Jer 9.23)?” declares the Lord
v 17…”But your eyes (Yehoikim) and your heart are intent only upon your own dishonest gain, and on shedding innocent blood and on practicing oppression and extortion (Yehoikim was wicked, don’t do these things)”
v 18…Therefore thus says the Lord in regard to Yehoikim (he succeeded Yehoahaz-2 Kings 23.34-37 and half-brother of Yehoahaz) the son of Josiah, king of Judah, “They will not lament for him: ‘Alas, my brother!’ or, ‘Alas, sister (in reply)!’ They will not lament for him: ‘Alas for the master!’ or, ‘Alas for his splendor!’
v 19…He will be buried with a donkey’s burial (who has no burial at all but is cast into a ditch; the donkey is a type of the natural man-Job 11.12), dragged off and thrown out beyond the gates of Jerusalem (2 Chr 36.6).
v 20…Go up to Lebanon (the mountains) and cry out (for help from the Assyrians or Egyptians), and lift up your voice in Bashan (another high hill); cry out from Abarim (the top of Pisgah and one of the peaks of Nebo in Moab; these mountains are named because from there they could look around to their neighbors and call to them for help). All of your lovers (allies) have been crushed (by Babylon).
v 21…I spoke to you in your prosperity (and reproved them); but you said, ‘I will not listen!’ This has been your practice from your youth (from the time they came out of Egypt), that you have not obeyed my voice.
v 22…The wind (Babylon) will sweep away all your shepherds (kings, princes, priests, counselors), and your lovers (allies) will go into captivity (Assyria and Egypt); then you will surely be ashamed and humiliated (disappointed in all those who you thought could help you) because of all your wickedness.
v 23…You who dwell in Lebanon, nested in the cedars (Jerusalem is referred to here because the kings and others dwelt in houses made of wood from Lebanon), how you will groan when pangs come upon you, pain like a woman in childbirth (this also alludes to the birth-pains of the Messiah)!”
v 24…”As I live,” declares the Lord, ” even though Coniah (Yeconiah who was also known as Coniah and Yehoichin) the son of Yehoikim king of Judah were a signet ring on my right hand (valued, close to me), yet I will pull you off (your throne);
v 25…And I will give you over into the hand of those who are seeking your life, yes, into the hand of those whom you dread, even into the hand of Nebuchadnezzar king of Babylon, and into the hands of the Chaldeans (2 Kings 24.8).
v 26…I shall hurl you and your mother (named Nechushta, the “givorah” or great lady who ruled as queen in Judah-2 Kings 24.8) who bore you into another country where you were not born, and there you will die (in Babylon).
v 27…But as for the land to which they desire to return, they will not return to it (neither by prayer or any false hope).”
v 28…”Is this man Coniah (Yeconiah or Yehoichin) a despised shattered jar? Is he an undesirable vessel? Why have he and his descendants still in his loins; not been born yet) been hurled out (as being king) and cast into into a land that they had not known?
v 29…O land, land, land (the earth, on which man dwells, is called as a witness to what is going to be said now), hear the word of the Lord!
v 30…Thus says the Lord, ‘Write this man down (as if he was) childless (in fact he wasn’t; he had descendants named Shealtiel and Zerubbabel-Matt 1.12 but he might as well have been childless because his descendants will not rule as a king ever again), a man who will not prosper in his days; for no man of his descendants (direct descendant) will prosper (as king) sitting on the throne of David or ruling again in Judah (and they didn’t; Zerubbabel was a governor but not a king. However, there is a problem. God made a promise to David that one of his descendants would reign on his throne forever, so how does Yehovah get around this curse and have Yeshua as king of Israel? Well, here is the answer. We have the kingly line promised in Gen 49.8-12 and Yeshua is the Messiah who sits on this throne, so how can that be possible? Matt 1.1-12 gives us the line of Joseph through Solomon, the kingly line. Luke 3.23-31 gives Miriam’s (Mary) line through Nathan, a non-kingly line. Yeshua is literally Joseph’s son through the flesh, but he is literally the son of David through Miriam, so God can still have Yeshua sit on the throne as a son of David despite the curse on the line of Coniah. There is also some evidence that Yeshau may have descended from Levi. Look at the priestly and Levitical names in Miriam’s genealogy in Luke 3. She was also related to Elizabeth, the wife of Zechariah, who was a daughter of Aaron and a Levite in Luke 1.5, 36).”