Hearing Christ's word and believing in God are not as simple as they appear; a single action or decision is not all it takes for these verses to apply. Even so, Jesus shows that the way is open now for some to avoid that eternal judgment of death and to pass from the state of spiritual death into spiritual life.
Passing from death into eternal life is a result of the relationship that God draws us into. A person who has been called by God, who responds by hearing Christ's word (in the sense of obedience), and begins to live a life of trust in God, is one who is now spiritually alive. If he remains in that state of spiritual life until the end, he will be in the first resurrection and given immortality.
“The hour is coming, and now is” means that from the time of His preaching forward, some of the spiritually dead would hear His voice, respond to Him, and begin living spiritually. In that case, the dead He is talking about are the spiritually dead of mankind.
But then the focus changes in verse 28 to the future: “The hour is coming.” A time will come when all who are in their graves will hear His voice and rise in a resurrection. “All who are in the graves” refers to those who have physically died. God, in His mercy, will resurrect each person at some point, “each one in his own order” (I Corinthians 15:23).
The fact that death is not the end is a major change from where things stood after Adam's sin. Each person will have the opportunity to live life spiritually, in union with God, because He “is not willing that any should perish but that all should come to repentance” (II Peter 3:9). He will, then, give everyone a chance to repent, to come out of his or her spiritual death, and to experience a life of reconciliation with Him. That opportunity could happen in this age, or it could happen in the resurrection to physical life that takes place after the Millennium (see Revelation 20:5).
David C. Grabbe
What Is the Second Death?