JOHN 1:12 NKJ
12 But as many as received Him, to them He gave the right to become children of God, even to those who believe in His name:
If you receive Jesus, you become a child of God. Romans 10 tells you how.
ROMANS 10:9-10 NKJ
9 that if you confess with your mouth the Lord Jesus and believe in your heart that God has raised Him from the dead, you will be saved.
10 For with the heart one believes to righteousness, and with the mouth confession is made to salvation.
16 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life.
God loves you and wants you to be in His family. That is why Jesus suffered punishment for all people's sins. Jesus did nothing wrong. He did not deserve to suffer. But He died in your place -- so you could be forgiven and join God's family.
11 And this is the testimony: that God has given us eternal life, and this life is in His Son.
12 He who has the Son has life; he who does not have the Son of God does not have life.
ROMANS 6:23 NKJ
23 For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord.
Eternal life is a gift -- not something you have to try to get. When you receive Jesus, you receive eternal life.