The best friendships cost something.
God wants to be friends with you so much... that He gave His only Son.
But the first living people chose not to obey God. Instead of seeking deep intimacy with God, they sought personal gain. People thoughout history have been seeking personal gain instead of deep friendship with God. This obsession with self is called "sin".
Sin separates people from relationship with God, the giver of life. Sin results in death.
God knew that He would have to change the hearts of people in order to gain their friendship. He would have to deal with sin once and for all... but the only way to end sin is through death. God needed a way to destroy sin without destroying the people themselves.
So He sent His Son, Jesus, to earth. Jesus passionately loved God, His Father. Jesus was free from sin - He was the only person who ever lived who never sought personal gain above relationship with God.
In Jesus, God found a way to destroy sin without destroying the people He loved - God transferred the sin of all people onto Jesus, and Jesus experienced agonizing death on a Roman cross.
But God went further and did not allow death to have the victory. Three days after Jesus died, God raised Jesus from the dead. Jesus cleared the way for all people to have victory over sin and death. This means that people can be friends with God! We are free to pursue a relationship with God above seeking personal gain.
If you really want to be friends with God, tell Him! Tell God that you believe Jesus died so that you could pursue a relationship with Him. Tell God that you will seek Him above personal gain, and that you're sorry for being selfish and turning away from Him for so long. Ask Him to forgive you, and ask Him to come into your life and heart as an intimate friend and as your loving Lord and Master. He only wants good for your life. He wants to be your friend!
In fact, the law requires that nearly everything be cleansed with blood, and without the shedding of blood (Jesus' blood!) there is no forgiveness. - Hebrews 9:22 NIV