There are two likely explanations that would allow you to avoid considering this a "timeline error".
Luke's training took a lot less time than it may be assumed. Either due to Luke's innate abilities (midichlorian count? :) ) or the fact that Force training to a certain level is a kind of phase shift event - you gain a certain level of control (Which can take any amount fof time from 1 day to 10 years) and you obrainobtain a set of skills/abilities, the rest of "Jedi Training" time is merely honing those.
Travel to Cloud City took a lot longer than to Dagobah. Yeah, Milleniumthe Millennium Falcon is a fast ship, but the galaxy is pretty big AND Han was trying to avoid the Imperials, so may have had to take a somewhat roundabout route.
P.S. Please note that the extended universe (especially the Bounty Hunter related books) might offer a fairly decent amount of detail to help establish the timeline.
Though, if you ask me to put my money on a specific answer, "timeline error" would be my bet. Remember - Lucas was making a space opera, NOT hard sci-fi.