The first thing to do it to use Levels to extend the range of greys so that the lightest are near white. Otherwise you will have to work with very small gradient segments.
Then you
Then you
- create a new gradient (+ icon in the gradients list)
- split it into as many segments as you need colors (right click menu)
- for each segment you assign a color to the left-hand point (right-click) , and then use Load right endpoint color ➤ From left end point to copy it. This gives a gradient made of bands
- then you use Color ➤ Map ➤ Gradient map to apply the gradient
- and then Ctrl-Z, move gradients segments limits, and re-run (Ctrl-F) the filter until everything looks rights (rinse and repeat)