Hey how are you
it sounds like the alarm is triggered on .
was the harness connector identical to the new engine
do you the ECM off the car you got engine from
you will need A KIA scanner or equivalent to reprogram & retrieve fault codes from the anti theft module , the code reader you have probably only read engine codes , does it hook up and says no DTC or it tells no Communication?
the engine cranks & starts and then computer don't recognize the key or a malfunctions in on of the alarm sensors , it thinks somebody stealing it and cut fuel pump .
You Can Try Master Reset If you have not already
Master reset Procedure
1- Disconnect Battery Cables ( Negative & Positive Cables )
2- Hold cables Together for 60 secs ,then let go
3- Wait 15 minute
4- Make sure all doors are closed
5- Reconnect battery Cables
6- Lock & unlock the vehicles using the key from driver door side (if you have a key fob with no blade key, just lock & unlock using the key fob buttons)
7- Enter the vehicle and attempt to start
Please let me know if that works for you
ASE Certified Technician