At every company I've worked at where I stayed for a bit, I eventually had to work on languages and stacks that I wasn't technically hired for/had interest in. At the very beginning I found this very hard, also wanting to quit/actually quitting. I've come to accept that this is actually pretty normal. The benefits to my career from working on a bunch of different stuff I didn't pick have been substantial.
Caveat: I probably wouldn't take the switcharoo at the very beginning either...if I'm told I'll work on A but actually get B, this is likely a sign of some important things not working well at the org.