The first successful method I found to do the same sort of thing was to use ImageMagick, but with a different operator than the earlier-suggested --separate/-swap.
The different operator is either -recolor or -color-matrix, depending on ImageMagick version.
Specifically, because I knew a "master color" of the original image (green, in your case and mine) and I knew the "master color" in the desired result image (blue, in your case, orange in mine), I gave ImageMagick' -recolor/-color-matrix option a transformation matrix with values that reflected the differences in each of the RGB channels.
For example, in my case, the fully green color was R:141 G:198 B:63 and I wanted it changed to R:231 G:159 B:70. The rest of the colors wanted to be changed equivalently.
So that means I wanted new pixels' R value to be 231/141ths of the current red value. Green values to be 159/198th of the current values. And blue values to be 63/70ths of the current values.
convert input.png -recolor "1.638297872 0 0 0 0.803030303 0 0 0 1.111111111" output.png
convert input.png -color-matrix "1.638297872 0 0 0 0.803030303 0 0 0 1.111111111" output.png
This seemed to work in a flash after fruitlessly spending a lot of time wrestling with Gimp/plugins and paint.net/plugins.