There shall come forth a shoot from the stump of Jesse, and a branch from his roots shall bear fruit.
Isaiah 11:1

God promised David that he would always have a descendant to sit on the throne. He didn't promise that his descendants would always actually hold any power. His line was never cut off, but it was severely pruned and even exiled for a time, but in the midst of that exile, under the thumb of a foreign empire, God gave David a Son who would transform his kingdom into something greater, something eternal, a Priest-King who would die, rise again, and ascend to a Throne that can never be corrupted, usurped, or surrendered.