You may not be able to control your thoughts, but God can and He wants to, because evil or immoral thoughts will only lead you astray. The Bible says, "The Lord detests the thoughts of the wicked, but those of the pure are pleasing to him" (Proverbs 15:26).
This is why the first step I urge you to take is to commit your whole life including your mind to Jesus Christ. God loves you and wants to remake you from within but it can't happen as long as you are separated from Him. By faith ask Christ to come into your life today, to forgive your past and help you live the way you should.
Then ask God to cleanse your mind and fill it with good thoughts instead of bad. Simply trying to empty your mind of bad thoughts won't help you; your old thoughts will just keep coming back. But when your mind is filled with Christ and His Word, old ways of thinking get pushed out. The Bible says, "Do not conform any longer to the pattern of this world, but be transformed by the renewing of your mind" (Romans 12:2). This will happen as you read God's Word and turn to Him in prayer.
When bad thoughts come, learn to practice what I call the "three R's." First, realize they are there, and that they aren't pleasing to God. Second, repent of them, asking God to cleanse you and take them away. Finally, replace them with good thoughts, by deliberately turning your heart and mind to Christ.