Andy, there are a few possible stumbling blocks in changing the freewheel on a hub motor, so here's some guidance for you.
The first is getting a suitable correct tool, since many have too small a central hole for the often larger spindle of a hub motor. An example of the tool you need is a...