This also happened to me after buying a used refrigerator. After a lot of research, it turned out to be the defrost timer. It had gotten stuck in the defrost mode. When it reaches the defrost mode, it turns off the compressor so the freezer can defrost itself. Since mine was stuck in defrost mode, the compressor would never turn on. After finding the defrost timer, it was in pretty bad shape. I went to E-bay, purchased a $12 defrost timer, and all was good again.
Hope this helps.
Paul