The easy way to tell is to pull the chain away from the rear sprocket and see how far you can get it to part from the sprocket. A coupla mm is fine but if it comes right away then it's shagged.
20k is bang on replacement time, my old ones all did 19k and were proper shagged. False economy running a shagged chain as it'll give you gear change issues almost other things and increased wear on parts.