It may be a reaction to pain like Ellen said, a horse that I knew of would have this habit of turning around and taking off if you did circles on him and after the chiropractor came he was behaving nicely. But if it's behavioral than it's probably because u let the horse get away with it the first time. Put your leg on and steer him straight to the jump. Don't give him room to duck out. Imagine your arms and legs as a solid wall or barrier preventing your horse from going anywhere but straight. Also be confident and don't overthink it. Don't expect the horse to stop but if he does, discipline him by backing him up and taking him right to the jump. Once he knows he can't get away with it he'll stop doing it. It can be a really negative cycle if u aren't confident and the horse stops because of that which makes u even less confident.
Start by checking if it has any pain/problems and if not start very small with super simple exercises and work your way up from there!