The strange thing is the more you "try" not to think the harder it is to stop thinking.....I had that problem. Then I tried not trying. I forget where I read it but the key is to allow thoughts to come and go but not to actually focus on them. like ,leaves floating down a stream. They are there and will be there, you can't stop that but you also don't have to try to catch them.
Accept that they are there and allow them to float on by.