Anything past 4 years and I swap in a new one. Also at that age and miles there can be other issues like a bad starter, bad connections and so on.
Since the starter clicked I would not suspect the neutral safety switch.
Start with a good battery terminal and pin cleaning job. If the battery is old, try another. I should not have to write about polarity and more. If so, have the work done by a car repair person.
I have a 2007 Toyota Yaris, Automatic, 1.5L engine with 172K kilometers on it. This morning I turned it on briefly to move it to the middle of my driveway so I had room to open all doors to clean it. I played music through the aftermarket stereo for about 1-1.5hrs then turned off the ignition when I finished. I went to start the vehicle approx. 10 min later to move it back, and it would not start. There was no crank, no engine start, nothing except one click when in the "on" position of the ignition. I made sure it was in park and that the key was in the ignition properly - still nothing. I figured the battery was dead, waited for my boyfriend to get home, and tried to jump the car. Car would not jump, no noises other than that one click. Tested the battery with our voltmeter, it reads 13.5v, so the battery is charged up fine. Checked all the fuses under the hood and under the dash - all fuses are in good shape. It will not start or crank in neutral or park and the dash lights/clock that usually comes on when the key is turned to the "on" position are also not coming on. The aftermarket stereo still works as it is wired into the dome light fuse. Boyfriend has worked on vehicles his whole life and can't figure it out - seems to think it might be a problem with the neutral safety switch but I want to exhaust all other options before throwing $200 at replacing it. He tried jiggling the switch around and making sure nothing was loose, which also didn't work.