Acts 13:36

36 “Now when David had served God’s purpose in his own generation, he fell asleep; he was buried with his ancestors and his body decayed.

Read Acts 13:36 Using Other Translations

For David, after he had served his own generation by the will of God, fell on sleep, and was laid unto his fathers, and saw corruption:
For David, after he had served the purpose of God in his own generation, fell asleep and was laid with his fathers and saw corruption,
This is not a reference to David, for after David had done the will of God in his own generation, he died and was buried with his ancestors, and his body decayed.