How can I know for sure that I will go to heaven when I die?"
 Answer:  Do you know for certain that you have eternal life and that you will go  to heaven when you die? God wants you to be sure! The Bible says: “I  write these things to you who believe in the name of the Son of God so  that you may know that you have eternal life” (1 John 5:13).  Suppose you were standing before God right now and He asked you, “Why  should I let you into heaven?” What would you say? You may not know what  to reply. What you need to know is that God loves us and has provided a  way that we can know for sure where we will spend eternity. The Bible  states it this way: “For God so loved the world that He gave His only  Son, that whoever believes in Him shall not perish but have eternal  life” (John 3:16).
 
We have to first understand the problem that is keeping us from heaven.  The problem is this - our sinful nature keeps us from having a  relationship with God. We are sinners by nature and by choice. “For all  have sinned and fall short of the glory of God” (Romans 3:23).  We cannot save ourselves. “For by grace are you saved, through faith,  and this not of yourselves – it is the gift of God. Not by works, so  that no one can boast” (Ephesians 2:8-9). We deserve death and hell. “For the wages of sin is death” (Romans 6:23).
God is holy and just and must punish sin, yet He loves us and has  provided forgiveness for our sin. Jesus said: “I am the way and the  truth and the life. No one comes to the Father except through me” (John 14:6).  Jesus died for us on the cross: “For Christ died for sins once for all,  the righteous for the unrighteous to bring you to God” (1 Peter 3:18).  Jesus was resurrected from the dead: “He was delivered over to death  for our sins and was raised to life for our justification” (Romans 4:25).
So, back to the original question – “How can I know for sure that I will  go to heaven when I die?” The answer is this – believe in the Lord  Jesus Christ and you will be saved (Acts 16:31). “To all who received Him, to those who believed in His Name, He gave the right to become children of God” (John 1:12). You can receive eternal life as a FREE gift. “The gift of God is eternal life in Christ Jesus our Lord” (Romans 6:23).  You can live a full and meaningful life right now. Jesus said: “I have  come that they may have life, and have it to the full” (John 10:10).  You can spend eternity with Jesus in heaven, for He promised: “And if I  go and prepare a place for you, I will come back and take you to be  with me that you may also be where I am” (John 14:3).
If you want to accept Jesus Christ as your Savior and receive  forgiveness from God, here is prayer you can pray. Saying this prayer or  any other prayer will not save you. It is only trusting in Jesus Christ  that can provide forgiveness of sins. This prayer is simply a way to  express to God your faith in Him and thank Him for providing for your  forgiveness. "God, I know that I have sinned against You and am  deserving of punishment. But Jesus Christ took the punishment that I  deserve so that through faith in Him I could be forgiven. I place my  trust in You for salvation. Thank You for Your wonderful grace and  forgiveness! Amen!"