Reduction from SAT to shortest cycle?
In the spirit of "give a man a fish, and he'll be fed for a day; teach a man to fish, and he never need be hungry again", I'll share with you some problem-solving techniques that might be helpful for approaching this problem (and other problems) -- but I'm not going to spoil it for you by solving your exercise for you.



Technique #1:  If you don't know how to solve a problem, change the problem: look for "nearby"/"similar" problems you do know how to solve.  If you can't reduce SAT to the original language, is there some related/variant language you can reduce SAT to?  You may need to try multiple variants, and get a feeling for which ones you can easily find a reduction for and which ones you struggle with.  This may give you some intuition about what the barrier/difficult part of your problem is, which may help you identify what aspect to focus your energy on.

Hint #1 (possible spoilers):


   If you changed "less than or equal to w" to "equal to w", would the problem be any easier?  What if you changed it to "greater than or equal to w"?




Technique #2: You can chain reductions.  If you can reduce SAT to some variant, and reduce that variant to the original problem, you're in business.

Hint #2 (possible spoilers):


   It seems that short cycles are a headache.  If you have a graph $G$, can you think of some way to transform it to remove all short cycles (without changing whether or not it contains a cycle of length $w$)?  (If you can't immediately see how to do it, can you write out a precise specification of what such an algorithm would need to do?)




And that's as much as I'm going to say.  It's a good exercise, and it's your exercise, so you should have the chance to play around with it and discover a solution for yourself.  It's tricky but doable.