Just a few points for the record. The SL100 is an obsolete low power, high conductance transistor, rather than a small signal, high hFE (current gain) low noise transistor. The SL100 is also in a metal can, so probably has a lower thermal resistance junction/ambient than plastic case types.
The SL100 important parameters are:
VCEo max = 50V
IC max = 500mA
Pd max: 800mW
VCE sat max @150mA: 600mV
J temp max: 200 deg C (probably a misprint and should be DegCW)
thr J/amb: not stated
https://www.engineersgarage.com/sites/default/files/SL100_0.pdf
The PN2222A parameters are:
VCEo max = 40V (worse)
IC max = 1A (much better)
Pd max: 625mW (worse)
VCE sat max @150mA: 300mV (much better)
J temp max: 150 Deg C
thr J/amb: 200 Deg CW
https://www.fairchildsemi.com/datasheets/PN/PN2222A.pdf
The BC337 parameters are:
VCEo max = 45V (worse)
IC max = 800mA (better)
Pd max: 625mW (worse
VCE sat max @500mA: 700mV (much better)
J temp max: 150 Deg C
thr J/amb: 200 Deg CW
https://www.onsemi.com/pub_link/Collateral/BC337-D.PDF
As the impedance of the buzzer is unknown it is not possible to say whether a lesser transitor will be OK. But the slightly lesser VCEo of the PN2222 and BC337 will not be a problem for this application.
Metal can transistors normally have a lower thr J/ amb, so the PN2222 and BC337 possibly have a higher thermal resistance but this should not be a problem, in practice. The much lower VCE sat will more than compensate for this anyway. This also applies to an extent to PD.
The BC10x family of transistors have a maximum current of only 100mA and are not recommended. The BC54x are modern replacements for the BC10x family. The BC84x family are surface mount versions.
The 2N2907 and BC327 are PNP transistors.
End of lecture.
spec