If your life was going to come to an end and you knew it, what could you do about your eternity? Do you know where you will spend eternity and are you sure of that?
Truthfully, there is nothing that you can do on your own to gain an eternity in heaven. The only pathway lies through Jesus and your acceptance of Him as your Savior. Repentance from your sinful life and turning toward Him to follow Him the rest of your life is the only way. Regardless of what you have been taught or what you may have heard, Jesus really is the Way, the Truth and the Life and nobody comes to the Father except through Him.
Our idea of righteousness, whether it is through religion or our own works, is nothing. It will not bring you into heaven but it will bring you into judgement. You will stand before God and Jesus to give account for your life and your reasons for your decision to live the way that you did. If you gave your heart to Jesus and repented of your sinful ways in order to follow Him until the end of your life then the meeting will go very differently. I can’t tell you exactly how it will go, but in the first instance you will be sent to hell. If you belong to Jesus and your life reflects that, then your sins are covered and your will be allowed into Heaven.