You could use an event tick into a gate that will be opened by pressing the jump button and closed by releasing the button or when the maximum jump length delay has finished.
I had no gravity enabled, so I made my own in the blueprint. But the gate part is what you would probably need I think.
There is a much easier way to do this. A variable jump height is built into the character movement and it literally only takes 30 seconds to turn it on.
This tutorial explains how to do it within the first 2 minutes: