If the key has stopped working and you are sure it is the key itself, there is no reason to replace the computer.
This is a security system, so being able to swap out a few parts that you can buy online and have it work makes it not very secure. The PCM and the instrument cluster are the gate keepers here. They each have to agree on the other's identity, and that of the key you are using, or the system won't let the engine start. So when either the PCM or the IC are replaced the system has to be reset, those two modules reintroduced, and the keys reprogrammed, or the system won't enable starting.
To do it you either need to take it to the dealer and have them do a PATS reset, or get a true ELM327 adapter and use ForScan to do it yourself.
I spent years diagnosing and repairing PATS issues professionally, and only once did I ever see the test get to the "replace PCM" result, and that didn't even fix it because the real problem was the chip in the customer's only key was dying, working intermittently, and that messed with the test results. So unless you have diagnosed it well, and are very very sure the computer is the problem, you are probably about to go down a very expensive road unnecessarily.