The plastic-body 2N2222, or "PN2222" has specs that are pretty close. Just remember the pins are not in the same order.
The '945 is E-C-B, left to right, leads facing down, flat towards you.
The '2222 is E-B-C, oriented the same way.
Can't just drop it in a circuit board oriented the same way. The "C" and "B" pins have to be reversed. Only a little clumsy.
73