At the 6th year of the reign of Zedekiah, I believe, because Jeremiah’s prophecy was synchronically delivered as a complement to Ezekiel’s prophecy in Ezekiel 18:1-32 (sometime between the 6th month of the 6th year and the 5th month of the 7th year of Zedekiah’s reign; time references: see 8:1 & 20:1). Jeremiah 30:1-31:40 is not Jeremiah’s first writing, as some do wrongly suppose. This is assumed because of Jeremiah 30:2, which says, “Thus speaketh the LORD God of Israel, saying, Write thee all the words that I have spoken unto thee in a book.” According to Jeremiah 36:2-4, 36:32, 51:60-64, this statement does not mean to convey that this is the beginning of Jeremiah’s prophetic writings but a continuance of them. Although much more could be said to prove the time placement of Jeremiah’s prophecy according to internal and external evidences that God has provided via the scripture, let it suffice the reader to know what foundationally brings these two prophecies together: both prophecies address the ungodly and heretical proverb that was notoriously popular among the backslidden and apostate Jews. The people said and believed that “the fathers have eaten a sour grape, and the children’s teeth are set on edge” (Jer. 31:29, Ezek. 18:2). God was jealously intent upon eradicating from memory this heaven-hated and hell-spawned proverb from the Jews, that’s for sure! Therefore, Jeremiah and Ezekiel (under inspiration) declared the stated purpose of God, saying,
“As I live, saith the Lord GOD, ye shall not have occasion any more to use this proverb in Israel.” – Ezek. 18:3
“In those days they shall say no more, The fathers have eaten a sour grape, and the children's teeth are set on edge. But every one shall die for his own iniquity: every man that eateth the sour grape, his teeth shall be set on edge.” – Jer. 31:29-30
Of course, and Jeremiah 30:1-31:40 were not unnecessarily repetitive. Rather, they were synchronically designed by God to refute the heretical proverb with substantial and complementary argumentation. If one prophecy was delivered before the other, I would assume that was the first. Ezekiel was explicitly and entirely focused on the underworking theological matters that are relevant to refuting the manmade proverb. Jeremiah, however, provides a closer look at illustrating the thoughts and words of the elect from among the Evil Figs when they would eventually come to repentance. Remember, the Evil Figs (the Jews living in the Land of Judah) were murmuring, saying, “Why? Doth not the son bear the iniquity of the father?” (Ezek. 18:19), because meanwhile people were dying on every side and the people didn’t believe that any of these individuals were wicked. This is why the LORD detailed the character of a righteous and just man in the Land of Judah (Ezek. 18:5-9). With the fruits of real righteousness freshly set before the people (Ezek. 18:5-9) and their ungodly proverb effectually refuted (Ezek. 18:10-32) one might expect the people to come to repentance right then and there. However, upon a closer look, we see that God was moved to offer life and forgiveness in the day that doomed sinners were on the brink of death and destruction BECAUSE it was necessary that these hardened Jews were brought to the very brink of annihilation (Ezek. 3:17-21, 18:1-32, 33:1-20). If they were not thus exercised by the Tribulation, they wouldn’t repent.