If possible exert when you try retreat?
In rules reference, page 7 (Exert): A hero can exert to reroll one terrain die. This can be used any time terrain dice are being rolled.
And in page 10 (Retreat): To retreat, the hero rolls one terrain die and may spend it to move to an adjacent hex that has the matching terrain.
Thanks.