Beware: The circuit looks very basic and is probably already inefficient, noisy, and quite possibly illegal to use in many countries without a licence or measures to prevent interfering RF emissions. Modifications may exacerbate it - including changing it to transmit at 40MHz. Penalties can be high for anyone involved. But hypothetically...
Any transistor has an upper frequency limit, but for most purposes, no lower limit. So the transistor should be fine for 40MHz in principle, in isolation. Although depending on how the circuit was designed, it may or may not actually rely on the transistor having a lower gain at a higher frequency. Saying that, I expect it would be fine for a crude result. Almost any small signal NPN transistor with similar characteristics should do.
But as well as C2 and L1 consider changing R2 and C3. They are all high frequency components that need to be tuned together for best results. Although for experimenting, I would simply change C2 and C3 to double their current value, which is roughly inversely proportional to the change in frequency you want.
To get a better idea of what's going on, construct the original circuit and use a 100MHz+ oscilloscope and a test audio tone to see how the circuit's meant to behave, then modify it to do the same at 40MHz.