Ok so those 2 posts are from the Toyota diagnostics FSM for your 2009. I can't say that you don't need a new transmission, but IMO given the only symptom described so far is a CEL, it seems far more likely there's something else wrong. I suggest having a competent mechanic go through the above procedure before dropping five grand. The "worst case" scenario above is a new ECM, NOT a new transmission. 200-series transmission failures are pretty rare, aside from a few issues when the 8-speed was first introduced in 2016.
That said I am not a mechanic and you don't say if you've had any other issues aside from the CEL, if you're the original owner, any other repairs (accidents, windshield replacement, etc). There's a chance it's something else, like a mouse that's chewed through some wire insulation which is causing occasional shorting to ground, or water dripping inside the vehicle from a poor windshield seal that's caused corrosion on a wiring harness connector.