I use FL studios with my Midi and odds are is you need to turn down your buffer quality so that there is little to no delay.
It’s probably by default set to about mid-high range which means you will almost for sure have 1 – 1.5 second delay
Don’t turn it down too low otherwise you’ll get trash can sound where everything sounds hollow and robotic, but keep smashing the keys while you’re adju8sting the setting