As the images are apparently not dithered to create the gradient, you have more than four colors (two greens and two blues) here. Note the histogram for your sample:
So as you are perhaps aware, you are looking at a potentially subtle recoloring process. There's blue in you "greens", green in your "blues", and red in there too somewhere. Results will be subjective and up to you to decide if they are good enough.
(Note: As @Ryan's answer points out...if you don't mind losing all the gradients, you can achieve flat replacement of a color range with a single color using Image -> Adjustments -> Replace Color. You'll have to do some masking if you are doing multiple color range replacements that overlap each other, though.)
Were it me, I would ask the designer to provide assets of this type in source form...as opposed to needing to run this kind of filtering on the flattened and compressed output. It's hard to tell on such a small sample image, but I'd guess the colors have been web optimized because of the discrete gaps in the histogram; a continuous gradient would yield smoother distributions.
But if bugging the designer for source files isn't an option, you're up a bit of a creek as far as automated solutions go. Here's the pessimistic answer of "you can't":
How can I edit the colors in an already-placed, custom gradient in Photoshop?
Then again, you can bound regions, create masks from the gradient, use gradient maps to apply new gradients. Sky's the limit and anything is possible with a bit of cleverness (and the ability to place every pixel by hand if need be.)
You might get some ideas from this video as well: https://www.youtube.com/watch?v=pJedscmjaFQ
But I'd find out if the designer actually has non-flattened forms of these dozens/hundreds of buttons/etc. and can give you files with more structure. If so, get those originals. If not, get them to change their practices and/or don't hire them again.