What board are you using? Is it a 5V or 3.3 volt board?
What current does your fan use.
If you didn't change the wiring, you may have damaged the transistor.
What is the HIGH level on the output pin?
What is the drain voltage when the HIGH is on the gate?
Show us a good image of the wiring.
Either loose wire or you damaged the mosfet.