Replacing timer with no neutral wire
You circuit is wired without bringing the neutral wire to the switch box and so only the HOT wire comes to the switch and the switched wire goes back to the fan.  For a traditional (i.e. dumb) switch, this works fine.

When you try to use a "smart" switch, and your electronic timer switch is such a switch, you have to supply power to the switch itself and that requires a neutral.

Two options:


Rewire the circuit between the fan and the switch to include a
neutral wire. 
Fall back to a mechanical timer switch that doesn't
require any power of its own.