The DPO is a term you need to know and remember (Dumb Previous Owner) or maybe not so Dumb as this one got a 60 year old bike running again with the original part not available. I take it the proper nut is for a larger diameter, so the DPO tuned the worn thread off, cut a new smaller diameter thread that matched a nut he had lying round. So your choice is new gearbox mainshaft so the proper nut will fit or reuse the odd nut on the modified gearbox mainshaft.
Threads are always under the nominal size so a 5/8" nut is never going onto a 16mm threaded shaft even with the same TPI. What TPI is the shaft, if it is 20 TPI then run a 5/8" 20TPI die over it or get some one with a lathe that can be set to 20 TPI to cut the thread to the proper OD. If its not 20 TPI then that old odd nut looks very attractive and you can make the circular section a hex.
Put Dykem (bluing) in the shaft and check where the nut is touching. If the peak of the thread is sharp what feels like a good fit might be only the peak touching or possibly the thread angle is wrong and touching the corner of the V. The peak is commonly either flat or rounded to height/8 on National threads and height/6 on Whitworth. The triangular height for a 20 TPI thread (0.050" pitch) are: National - 0.86603 * pitch = 0.043315" Whitworth - 0.960491 * pitch = 0.048025"
Subtract half that from the basic major diameter to get the pitch diameter. National - 0.60335" Whitworth - 0.60099"
The theoretical O.D. is National 0.625 - 0.043315 / 8 * 2 = 0.61417" Whiworth 0.625 - 0.048025 / 6 * 2 = 0.60899"
Was the shaft cut oversize or to a metric dimension? 20 TPI is 1.27mm. If the thread is actually metric a 20 TPI nut will fit if the depth is cut far enough and the length of engagement is short enough.