David fell in 2 Samuel 11. He saw that Bathsheba was “very beautiful,” and he followed his lusts down the slope to adultery—and then even to having her husband killed.
But by 1 Kings 1, David is able to be attended to by Abishag the Shunammite, who the text also says was “very beautiful,” and yet “the king knew her not” (verse 4).
Maybe aging was a factor, but my guess is that there’s much more going on here than merely getting old. Such a change sure seems like God’s purifying hand in some regard—if not mostly. It’s a real-life example of victory.
There’s no need to be captive for the rest of your life, if God would so move. Be hopeful and lean on him for help.