Power suply 300V regulated with LM317
If the 3k (3.3k) resistor1 is getting hot, it means that all of the load current is passing through it.2 If the transistor is working correctly, only a tiny fraction of the load current should be passing through this resistor, so verify that all of the connections to the transistor are correct. It's behaving as if its collector is open-circuit.



1 In the future, please add reference designators to your schematics. It makes it a whole lot easier to talk about specific components.

2 It's dropping about 36 V (0.4 W) with the 27 k&Omega; load, which (just barely) allows the LM317 to regulate. But it's dropping more like 150 V (6.7 W &rarr; smoke!) with the 4.2 k&Omega; load.