Replace 3-way Dimmer with Timer Switch
The dimmer you are replacing is a 3-way dimmer, but the timer is a single-pole.  They both have 4 wires because the dimmer doesn't need a neutral, but the timer does (to power the timer).  You'll need to get a 3-way timer.