Its not all about going to church, having fellowship with other believers is nice because we are all apart of the body of Christ
But to rebuild your relationship with God, I think you need to spend time in His word, in prayer, and in fellowship with Him
I believe that you can have a very strong relationship with God without going to church at all, as long as you are seeking His will, Studying His word, Trusting in His Son for salvation, and being consistant in prayer
Congregating with the Body once a week is nice, but for some people it stops there, fellowshipping with God needs to be an everyday thing
-1 Thessalonians 5:16-24-
Rejoice always;
pray without ceasing;
in everything give thanks; for this is God's will for you in Christ Jesus.
Do not quench the Spirit;
do not despise prophetic utterances.
But examine everything carefully; hold fast to that which is good;
abstain from every form of evil.
Now may the God of peace Himself sanctify you entirely; and may your spirit and soul and body be preserved complete, without blame at the coming of our Lord Jesus Christ.
Faithful is He who calls you, and He also will bring it to pass.
Stand firm brethren and God Bless