Difficult to say really.
If you are aiming to power up your Mewtwo (I hope you get it and that it is a good one) and haven't loads of Rare candies, then every extra candy from walking helps.
But 20km is quite far to walk and if you don't walk much playing this game and/or the game drift at home/work, then every candy will take forever to get.
I walked mine for 591km, but that really only gave me 29 candies, which isn't that much really. Sure it helped, but it also took a very long time. In the end I spent lots of Rare candies on it anyway to get it to lvl 40. 29 candies really didn't make that much of a difference.
Of course, if you aren't in a hurry to power it up and you don't have/get many Rare candies, then I suppose it's worth walking it.
Besides, getting candies for Tyra, Dragonite etc. is far easier than for Mewtwo.
You get more candies for them during 20km, but it's candies you can find elsewhere. You won't catch or hatch a Mewtwo and it's more likely that you'll find a Tyra raid than a Mewtwo raid.
So there might be fewer Mewtwo candies, but they are more valuable.
Feels like I'm making very little sense and isn't much help.
Anyway, just look at what you need and want. Do you want to power up a Mewtwo immediately, then you might as well just pump Rare candies into it.
And if you are in need of candies for Tyra or Dragonite (or anything else), then maybe stick with those.
Personally I'd rather spend Rare candies on Mewtwo (or a good Legendary) than on Pokemon such as Tyranitar.
I hope my post atleast helped you a bit :)