Get into a jam

To become involved in trouble or a problem.

I got into a jam when I lost the keys to my apartment.