Going to Heaven does not depend on how good you have lived your life. The Bible clearly teaches us that you only need to be saved to have a place in Heaven
John 3:3 tells of a man who asked Jesus what he must do to go to heaven and Jesus replied : "Lest a man be born again he can not enter the kingdom of Heaven." You must be saved. There is no way around it.
Before you can be truly saved you must repent of your sins. This does not mean you must never sin again, but after salvation you will feel a desire to please the Lord by living according to his Word. Once you have repented of the sin in your life, you only need to ask Jesus to come into your life and become your personal savior. This places your name in the book of life.
Once saved you can not be unsaved. Do not get caught up in religions that tell you that one can lose there salvation.
When you get saved you will be living a different life, but you will still be human. Do not expect to be perfect after getting saved. We all have sins that trouble us even years after getting saved.
Join a sound fundamental Bible believing church. This will give you the strength and teaching that you will need after getting saved.