For you to be sure if you are going to heaven, firstly you have to have faith in God and believe in him, repent and confess your sins, also believe that Jesus death on the cross has paid for all the sin's and you are saved.
Believe that Jesus Christ is the son of God and that his resurrection has made a way for you to be forgiven and have eternal life.
Confess Jesus with your mouth, and say that Jesus is the Lord also believe that God raised him from the dead which is the act of salvation.
Commit your life into the hands of the lord, live your life according to his will, and make him your lord and personal saviour.
One thing to have in mind is that salvation cannot be earned, the book of Ephesians says for by grace are we saved through faith, and not of yourself it is the gift of God.
God's grace covers our sin, you can be a good person, a loving person or even a cheerful giver, but we were all born with a sinful nature that is why the sacrifice of Jesus was the only solution to remove all our sins so that we can be with him in heaven, and it doesn't mean that we don't need to ask God for his forgiveness anytime we sinned against him what we will do is to speak to Jesus directly through prayers.
Having Jesus in our lives gives us eternal security in this life and the life beyond. We're nothing without Him.