Mind there are two variants of 2N2222 with different pin assignments. Like PN2222 in TO92 or something like that.
Try with different npn transistor as well.
Also with npn as well as with mosfet you may need a resistor from base to ground in order to speed the transitions up.
Also 1 picosecond edges with you signal is something I would not use in simulation as that is pretty unrealistic assumption..

PS: your npn version does not work in LTspice properly, btw.
The duty cycle and period of your driving signal has to fit somehow your inductance and load.
You have to see the collector current to ramp up to certain level, which converts to higher voltage then.
Also you need some base current.
You have to play with the duty and period and base current and inductance and load, or do the math
