Jelly, 13 12 bytes
r²ÆṪ=€Ḣ$T+⁸Ḣ A monadic link taking an integer and returning the next integer with shared totient or zero.
Explanation
Main link (takes integer argument z)
r² | Range from z to z ** 2 inclusive ÆṪ | Totient function of each $ | Following as a monad =€Ḣ | - Check whether each equal to the first, popping the first before doing so T | Truthy indices +⁸ | Plus z Ḣ | - Head (returns 0 if the previous link yielded an empty list)