500V generation, MOSFET Heating Problem
Try the following.
As it worked in lashup mode these may well help.


Add a say 10V zener gate to source close to FET.   
Add maybe also a reverse biased small Schottky diode in same location. 
Use a small resistor in gate drive. (3 - 10 Ohm range). 


Zener clamps induced gate spikes via Millar capacitance from drain.
Schottky clamps negative 1/2 cycles of gate oscillations.
Drive R helps damp gate oscillations.

Report back.

What is the turns ratio?
FET must be rated >> [500 VDC / turns ratio]

FET data sheet here