So the first code looks like a liftgate issue which should not affect the engine running. Please start a new thread for that if you want to have us help you fix it.
Code B366B-00 - Liftgate Ajar Switch Circuit
Code P1019-00 - Variable Valve Timing (VVT) Solenoid Range/Performance
The p1019 code may cause this but can I ask how the engine sounds while cranking over? Can you please upload a short video of the engine when trying to start it, that way I can tell if the engine is any good or not.
When you crank the engine over does the security light flash? If so, I would do a hard system reboot, this guide can show you how.
https://www.2carpros.com/articles/step-by-step-guide-performing-a-hard-system-reboot-for-your-vehicles-electronics-systems
If the light is not flashing, please go over this video which shows the MAP sensor can cause this problem:
https://www.youtube.com/watch?v=lXLJbuAZ4CE&t=1s
Here is the location of the sensor so you can unplug it to see if it makes a difference.
Image (Click to make bigger)
Friday, May 9th, 2025 AT 11:19 AM