Is the connection at B less than 24 hours? In that case, you are changing routing by adding a stopover, which often changes the fare a lot. Can you check the fare rules for any allowable stopovers? My guess is you'll get a better deal after you have flown to B as the agent said.
If free stopovers are allowed and Z is available on all the flights, you will probably pay the change fee only. But there are other rules (higher intermediate point) that could come into play.
Since you are re-routing, you could consider asking to include X on the ticket when you re-route.