You are in way above your head here. Like I said before it is not a "fair" encounter for on-on-one.
Your PC is 17th level the dragon has at least 22 HD - that puts him way above your CR capacity.
Now if the DM does a lot of "limitations" like prevents the dragon from flying or using all of its abilities then it might be closer - but still just using HD puts it a 5 above your level (which is 3 above the tough encounter and well into the probably deadly range).
Combat here is not your friend - your best bet is to "negotiate".
Your PC is 17th level the dragon has at least 22 HD - that puts him way above your CR capacity.
Now if the DM does a lot of "limitations" like prevents the dragon from flying or using all of its abilities then it might be closer - but still just using HD puts it a 5 above your level (which is 3 above the tough encounter and well into the probably deadly range).
Combat here is not your friend - your best bet is to "negotiate".