Perl 5 + -pl
, 3431 bytes
Thanks to @DLosc for saving 3 bytes in the regex!
A different approach to @Xcali in their answer.
s/[^z]z*$.z*$/$&=~y!0-9a-z!1-9a-z0!r/e
Explanation
Replaces any character that isn't z
, followed by 0 or more z
s, with the result of transliterating 0-9a-z
to 1-9a-z0
.