Seven Kings Must Die ties in the remaining plot of The Last Kingdom. However, a major book change would have to be made at the end of the book to do so.
Warning! Spoilers for Seven Kings Must Die!
Seven Kings Must Die deviates significantly from its source material, including making a much-needed final change to the book series. As always, in adaptations between literature and the screen, some changes are required to finish the story in a way that suits the medium and the anthology, even as it deviates from the source material. The Last Kingdom and, by proxy, Seven Kings Must Die to alter many elements of the original novels and have done so throughout their production. As such, it makes sense that the series and movie would lead to a significantly different ending in Seven Kings Must Die than the one in the books.
Seven Kings Must Die is a sequel to The Last Kingdom series and is loosely based on The Saxon Stories book series. The film meets Uhtred of Bebbanburg (Alexander Dreymon), as his lands and possessions have been restored to him, and he has been at peace for several years. Meanwhile, the Danes keep trying to conquer, and the Anglo-Saxon throne becomes vacant after the death of King Edward (Timothy Innes). This conflict eventually culminates in the Battle of Brunanburh and the unification of the English people, in which Uhtred plays a decisive role. He ensures that the next king, Athelstan (Harry Gilby), will be able to bring Alfred (David Dawson) into a united England.
How the Last Kingdom movie changes the ending of the book
After the Battle of Brunanburh in Seven Kings Must Die, the movie ends with Uthred arriving in Valhalla as the seventh king to die. This allows Athrid to divide Northumbria for Athelstan to form a united England before his death and fully tie the ongoing political intrigue. Naturally, this was impossible in the books, because Uhtred tells it. The books end with a very similar battle with Aethelstan and Uhtred on one side, and Anlaf (Pekka Strang), Constantine (Rod Hallett), Owain of Strath Clota (John Buick), and others opposing them. The difference, however, is that the series also ends with Aethelstan being ordered to marry Uhtred so that he can become Lord of the North.
Why seven kings must die to end the death of Uhtred
However, it makes more sense for the series and movie to end with Uhtred's death, as it leads to a more satisfying narrative ending. The movie could end with Uhtred's death because the franchise didn't tell him as it does in the books, allowing the production to give him a warrior ending, befitting everything he's accomplished throughout the franchise's run. But even after giving his character a proper conclusion, Uhtred's death in Seven Kings Must Die demonstrates why the franchise ended with a movie instead of a fifth season.
Essentially, The Last Kingdom franchise has continued beyond season five because the series ended with King Edward's ascension to the throne. But the books went even further by establishing the base of Aethelstan, which means the series has even more stories to tell. Seven Kings Must Die takes the action to the climax of this conflict by showing the series' "true" ending with Uhtred's death (or at least what it means is imminent). This connects Uhtred's arc while providing the historical context for the true unification of England.