Keep in mind non fancy goldfish actually have a 50year lifespan. 10 years is only a small amount of time for a goldfish to live. If kept in best conditions they can live 30+. Dying before that means their tank probably wasn't big enough or their diet was bad. Although many also meet accidents in that time period. Koi can possibly live 100-200years. These are very long lived fish if kept properly. In the news a few years back there was a koi that had been cared for by 5 generations of family. Fancy goldfish due to being bred for specific looks that poorly impact the health of the fish have a much shorter lifespan of only 10-15years even when kept properly.
You need a pond liner. After you dig a pond you then lay down a plastic? nylon? pond liner that seals the water from the dirt. I haven't actually set up my pond yet so I don't know details but I have done some research into it and the goldfish/koi threads come up frequently on fish forums. Especially the rants about how poorly these fish are often kept and how shortened their lifespans are from what they could live.