You are up against the fact that you should never buy this variation of XC70 as ALL the gearboxes are junk even when new and IF they lasted a while the owner was very lucky.
There is a rebuild kit from USA BUT FOR ALL THAT IT COSTS YOU WOULD HAVE BEEN BETTER BUYING ( SORRY FOR CAPS , ) a 209/10/11/ etc car as the cost to fix a really old Volvo is not worth it unless you do ALL the work yourself.
Really , sell it.
If it is running real well when you cancel codes then sell it and get a later model variant , XC70 3.2 litre last for easily 500,000 kilometres , my mate has one and still going well and looking good and much more safety than the one you have.