I replaced the cylinder, and the key is hard to turn. The car starts, but then shuts off.
It sounds like the ignition lock assembly may be damaged. This is the part that the lock cylinder goes inside and may need replacing. There seems to be a recall on the ignition switch for this car. I would take it to the dealership and have them look up the recall for this car. If the security light is on that will be a completely different issue and may need to be looked at by the dealer. You can also have your key ignition inspected by a certified mechanic from YourMechanic to have this problem diagnosed.
Our certified mechanics come to you ・Backed by 12-month, 12,000-mile guarantee・Fair and transparent pricing