The answer is - faith in Jesus.
" Father, just as you are in me and I am in you. (Jn 17:21a) NIV
The three persons of the triune Godhead are eternal.The second Person of that Godhead (Jesus) came to earth 2000 years ago and, through his death on the cross, made salvation available to all, regardless of when they lived on earth. King David, the Patriarchs, the Old Testament prophets and many others from that time will be among those who rise from their graves on Judgement Day to meet the Lord in the sky (see 1 Thess 4:16 NIV).
SLE