The prophecy of Jer 23:5-8 (indeed the whole chapter) essentially contains two elements:
1. A coming King, here called the "righteous branch", a descendant of King David specifically, who would act wisely and rule justly, etc.
This is clearly a Messianic prophecy and is part of the Davidic covenant 2 Sam 7, 23:5, 1 Kings 6:11, 12, 8:25, 1 Chron 17:11-14, 2 Chron 6:14-16, 7:17, 18, 13:5, Ps 132:11, 12, Eze 37:15-28. This is an eternal covenant. The provisions of the Davidic Covenant were as follows.
- God promised to make David, a shepherd, king over Israel. 2 Sam 7:9, 1 Kings 8:25, 2 Chron 21:7.
- God promised to defeat all David’s enemies and give him peace on all sides, 2 Sam 7:9
- David’s name would be great, 2 Sam 7:9-11
- God promised there would always be a blood descendant of David on his throne, by an eternal “covenant of salt”, 2 Chron 13:5, forever, 2 Sam 7:13, 15, 16, Eze 37:26, (2 Sam 23:5).
- God promised that the descendant of David would have God as his Father and he would be His son, 2 Sam 7:14.
- David’s son, Solomon, was the person to build the temple, 2 Sam 7:12, 13.
- David and his descendants must remain faithful to God and keep all that is written in the Book of the Law (Deuteronomy), Deut 17:18, 31:26.
Note that the Davidic Covenant was distinct from the Israelite and Levitical Covenants – David became a type of the eternal reign of Messiah to come.
While David and his successors were earthly kings, they were to recognise that the real king of Israel was God. 1 Sam 8:7, 8, 24:6, 2 Sam 19:21, 1 Chron 28:5, 2 Chron 9:8, 13:8, Ps 5:2, 44:4. See also 1 Sam 12:14.
Note that it is a simple matter of history that David’s descendants were not always faithful and the earthly Davidic dynasty ended in 586 BC with the final capture of Jerusalem by Nebuchadnezzar. However, the New Testament calls Jesus Christ, Messiah, “the Son of David” as a direct fulfilment of the (ultimately) eternal throne of David which Jesus inherited. Matt 1:1, 20, 9:27, 12:23, 15:22, 20:30, 15, 21:9, 15, Mark 10:35, Luke 1:33, 18:38, 39, Acts 13:32-37, Heb 1:8. See also Rev 11:15, 19:16. Such a Messiah was prophesied long ago: Ex 15:18, Ps 10:16, 61:7, 68:16, 92:8, 93:5, 146:10, Isa 9:7, 47:7, Lam 5:19, Micah 4:7, etc.
Thus, Jesus fulfilled all that was promised under the Davidic covenant as the promised Messiah, and King. Jesus now sits on the eternal Throne in heaven (Mark 14:62, 16:19, Eph 1:20, Col 3:1, Heb 1;13, 10:12, 1 Peter 3:22, Rev 5:1.) One day He has promised to return and collect the faithful saints to that we can be with Him (John 14:1-3).
2. Rule Over Judah and Israel Securely. Again, this has not ever been fulfilled literally either in historically, nor presently. Jesus does not rule over the current state of Israel now nor in the first century. The modern state of Israel does not even recognise Jesus as Messiah. It is a secular state, officially.
Paul deals with this question in Rom 9-11 at some length but am not going to give a detailed exposition of this passage as it already has a huge, and very divisive, literature. Suffice to say here that Paul summarises his position with this statement:
Rom 9:6-8 - It is not as though God’s word has failed. For not all who
are descended from Israel are Israel. 7Nor because they are Abraham’s
descendants are they all his children. On the contrary, “Through Isaac
your offspring will be reckoned.” 8So it is not the children of the
flesh who are God’s children, but it is the children of the promise
who are regarded as offspring.
That is why He can later say, that (Rom 11:25, 26)
And so all Israel will be saved, as it is written: “The Deliverer will
come from Zion; He will remove godlessness from Jacob. And this is My
covenant with them when I take away their sins.”
Thus, "Israel" is now a spiritual nation (1 Peter 2:9, 12). As usual, the key to understanding this is the centrality of Jesus.
- All the promises God made under the Old Covenant to Israelites find their fulfilment in Jesus as mediator of the New Covenant to Christians, Matt 5:17, Gal 3:16, 22, 29, 2 Cor 1:20, Rom 9:8. Thus, the New Covenant promises to save all people. Specifically, God said of the Christian community, “But you are a chosen people, a royal priesthood, a holy nation, a people for God’s own possession, to proclaim the virtues of Him who called you out of darkness into His marvelous light. Once you were not a people, but now you are the people of God; once you had not received mercy, but now you have received mercy.” 1 Peter 2:9, 10 (Compare Ex 19:5, 6, Hos 1:9, 4:6)
- Hebrews discusses the same idea that the Moral Law of God is to be written on our hearts, Heb 8:7-13, 10:16, 17, exactly as it should have been under the Old Covenant (compare Deut 6:5, Jer 24:7, 31:1, 33, 34, 32:38-40, 36, 26-28).
- Christians were to be “called by my Name” as confirmed in Acts 11:26, just as under the Old Covenant (2 Chron 7:14, Isa 43:7, 65:1). Matt 10:22, 24:9, Mark 13:13, Luke 21:17, Acts 15:17.
- Jesus is the promised King of the new Christian Community, ie, the Kingdom of Heaven, or, Kingdom of God, Luke 1:33, John 1:49, Acts 13:23, Rev 11:15. Compare Jer 33:14-17, Eze 37:22. Thus, Jesus inherits the Davidic Covenant. He is also the “Son of David” (Matt 1:1-16) and “Son of God” as predicted in the Davidic Covenant (2 Sam 7); and His kingdom will never be defeated and is eternal, Luke 1:33, Heb 1:8, Rev 11:15, compare Ps 61:7, Isa 9:7, Psa 146:10.
- Jesus is the high priest of the New Covenant Heb 4:14-16, 7:23-28, 8:1, 2, 9:1-28, 10:1-18. Thus, Jesus inherits and was the fulfilment of the Levitical Covenant (See Mal 3:1). Jesus did this in several ways as well such as:
- Jesus was the fulfilment of what the sanctuary/temple typified, John 2:19-21, Heb 9:1-28, 10:1-18
- Jesus represented the foundation of the temple as well, 1 Peter 2:4-8 (Compare Isa 28:16, Ps 118:22)
- Jesus was the bread of life, John 6:35, 41, 48 (compare Ex 25:23-30, Lev 24:8).
- Jesus was the light of life, John 8:12, 9:5 (compare the lampstand Ex 25:31-39, Lev 24:3, 4, Isa 53:11, Ps 56:13, etc)
- Jesus provides the water of life, John 4:13, 14 (Compare the laver Ex 30:17-21. See also 1 Cor 6:11)
- Jesus is the promised seed of the woman Gal 3:16 (compare Gen 3:15, and the Abrahamic Covenant)
- Jesus was the Passover Lamb and thus the promised Messiah, John 1:29, 1 Cor 5:7, 1 Peter 1:19 (compare Ex 12:1-14).
- Jesus is the High Priest of the New Covenant in fulfilment of the Levitical covenant, Heb 4:14-16, 7:23-28, because He was “pure, blameless, set apart” exactly as the Levites were. See also Heb 9:15, 12:24.
- Jesus provided the blood of the new covenant of which the communion ceremony was to be a memorial, Matt 26:28, Mark 14:24, Luke 22:20, 1 Cor 11:25, Heb 13:20, 1 Peter 1:19 (compare Ex 24:5, 8).
- Jesus did not abolish the Israelite Covenant and Moral Law but came to fulfil them, Matt 5:17-20, Gal 3:21. The moral law still applies to Christians BUT Jesus fulfils the Levitical and Davidic covenants by being the eternal High Priest and the Eternal King of the Kingdom of Heaven.