HOW TO DO THIS STROKE GRADIENT LOOP ANIMATION?

So, this is the logo and in after effects i want to animate the stroke gradient that goes in a loop, i tried re-positioning the gradient with keyframes but that's not working. i've no clue how to do this. i want this stroke gradient to run in loop. please let me know how can i do this. this is so complicating. thanks.

