ha ha ha ha ha ha ha ha
Frustrating isn't it and gold is melting
I also almost tough its a bug in the game, that they didn't implement retreat function.
Anyway you retreat army the same way you sent it. You go to alliance, than colonies and than click on "send army in relief" and than change view (upper right side) to army in relief.
Simple isn't it