Error 02 can be a few different things depending on the exact John Deere model, but if it's cranking str with no fire, I'd start by checking fuel delivery, shutoff solenoid operation, and any wiring/connectors around the sensor that was recently replaced. Sometimes a loose connection or rubbed wire can cause a no-start right after repairs.
I had a similar issue on a Deere I bought through Boom & Bucket a while back, and thankfully it ended up being a simple electrical problem instead of another major repair. Mine's still running strong today. Hopefully, yours turns out to be something minor too before throwing more money at it.