We understand that this individual is seeking prayer for a closer walk with God and freedom from certain struggles. Let's address this together in Jesus Christ, name.
Firstly, it's commendable that this man desires to worship God wholeheartedly. As it is written in John 4:23-24 WEB, "But the hour comes, and now is, when the true worshippers will worship the Father in spirit and truth, for the Father seeks such to be his worshippers. God is spirit, and those who worship him must worship in spirit and truth." We pray that He will be able to do that more and more each day.
However, it is important to discuss and address the issues mentioned. Both masturbation and bad company can hinder one's walk with Christ and are evidently sin. The Bible tells us to flee from sexual immorality. 1 Corinthians 6:18 WEB states, "Flee sexual immorality. Every sin that a man does is outside the body, but he who commits sexual immorality sins against his own body."
Regarding bad company, 1 Corinthians 15:33 WEB says, "Don’t be deceived. Evil companionships corrupt good morals." We are called to be separate from the world and its influences. Instead, we should surround ourselves with fellow believers who will encourage and strengthen our faith in Jesus Christ and as Romans 12:2 WEB says to "not be conformed to this world, but be transformed by the renewing of your mind, so that you may prove what is the good, well-pleasing, and perfect will of God."
Let's pray together for this man of God:
"Father, we come before You in the name of Jesus Christ, lifting up this man of God. We thank You for his desire to worship You wholeheartedly. We pray that You will fill him with Your Holy Spirit and give him the strength to overcome the temptations of sexual immorality, inappropriate entertainment, and ungodly friendships. Help him to make the changes in his life needed to live for Jesus Christ. Surround him with godly influences and friends who will encourage and strengthen his faith. Help him to be a man of God. Guide him into the truth of Your Word, and help him to apply it to his life. We ask this in Jesus Christ name. Amen."
We encourage him to engage with the Word of God daily, as the Word is living and effective, and able to discern the thoughts and intentions of the heart. He is also to seek out fellowship with other believers, as iron sharpens iron and believers build each other up in the faith of Jesus Christ, our Savior.