Some people will do like you said,the cooking will make them concentrate on one thing as compared to other things.Every time you need to spend huge time on cooking,So you may forgot the gambling at the time of cooking.
It's not about spending more time on one thing in order to forget about another. That will make you focus less on other things in the long run. It's about enjoying what you are doing for the time being. If you are just doing other stuff to avoid something, when the work is done, you may come back to the thing you were trying to avoid.
Instead, try to find something that gives you pleasure and the same feeling as gambling. When we are in an adrenaline rush, things that we don't like will eventually become boring, and trying to do it forcefully will trigger our minds to go back to feel the same rush again. So think this through and try to find something that best suites you. That will help you a lot. Don't just stick to others' ideas. Create your own.