Oops, I never realised that diagram had a transistor part number on it.
I just used the first online circuit diagram creator I found, and picked the NPN transistor. I did delete the resistor value, but never noticed the transistor had a part number.

The other option would be a micro-relay.
I've used DIP packaged relays in the past. Something like this - https://uk.rs-online.com/web/p/solid...relays/4801188 (that's just the first one I found)