There's a few ways of going about this.
Two of which have already be mentioned.
Attachment:
File comment: Script by RobA
sample-gradient-along-path.scm [5.85 KiB]
Downloaded 26 times
Attachment:
File comment: Script by RobA
gradient-from-image.scm [3.28 KiB]
Downloaded 25 times
If you have
G'MIC installed.
There's a filter under the category of,
Rendering>Gradient [from line].
I used the default settings with this filter.
Making sure when adding the name of the gradient into the
"Saving Gradient As" space.
To not have spaces between the letters in the name of the gradient.

Click
Update then
Apply and the gradient will be saved with the name given.
Refresh the
Gradient Selection Dialog and the gradient will appear within the Gradient Selection Dialog,
ready for use.
