changing route distance.

I’m trying to create an internet failover script on my router and would like to change the distance and add a check-gateway of a pre-existing route. However when try I get the following error:

failure: can change only static routes

Is it possible to change a pre-existing route?

Remove the origin of dynamic routes (for example from dhcp client) and set the routes manually instead.

brilliant thanks.