The Bible doesn't say that.
Rather, "go to heaven" is common shorthand for describing the intermediate state of being present with the Lord between death and resurrection, which Scripture only briefly talks about.
Between bodily death and bodily resurrection we are, in some way, present with the Lord. We call that "going to heaven" since we read in Scripture that our Lord at His ascension was taken up into the heavens and seated at the right hand of the Father. Now we shouldn't be thinking that there is some place called "Heaven" where God has a big giant chair that He sits on. But what matters here is that there is a kind of experience of God's glorious presence which only the angels and reposed saints in Christ know. Such things, we should say like the Psalmist, are "too wonderful for me, too lofty for me to understand".
Scripture doesn't talk about it a lot, it barely touches upon the intermediate state. But Scripture is clear enough, even in its brevity, that while the body sleeps, there is a conscious experience of God's presence.
Two passages that mention this intermediate state are 2 Corinthians 5:6-9 and Revelation 6:9-11.
For this reason we can remember our Lord's words, that God is not God of the dead, but of the living (Matthew 22:32) and that He is "the resurrection and the life. Whoever believes in Me, though he die, yet shall he live, and everyone who lives and believes in Me shall never die." (John 11:25-26).
Our hope of future resurrection is certain, for Christ our Lord has Himself been raised from the dead. But even right now, Christ has overcome death so that in Him, even in bodily death it is only a slumber. For the dead shall be raised, and those who are Christ's are ever-alive with and in Him.
-CryptoLutheran