2N7000 driver circuit Raspberry Pi
If your load is located 20 meters from 2N7000 switch (as the comment says), the problem is in wire inductance.

A 20-m wire has self-inductance of about 50 mH. When the N-FET turns OFF, there will be spikes of voltage with kV-level amplitude, which will kill the FET. You need to use a clamping diode, as it is normally used when controlling coils of electromechanical relays.