Is the technique Sanji learnt during the timeskip different from the one CP9 members and other Rokushiki users performed to stay in the air? If yes, what's the difference? If no, why did it take so much time for someone so talented at fighting with legs to learn it?
Geppo translates to 'moon walk'. There's really no difference between Sky Walk and Moon Walk.
You can check One Piece Wiki which lists Sky Walk as a variation of Moon Walk. The only difference it mentions is
After the timeskip, Sanji demonstrates this ability by kicking the air to jump higher, giving the appearance of flight.
However, when we see Sanji using Sky Walk here, Robin says that it's the moon walk of CP9.
I guess the only difference is in its naming or maybe the ability to jump a bit higher in Sky Walk.
As for it taking Sanji time to learn Sky Walk, I don't think it took him that much time. It's not like Sky Walk was the only thing he learned in the 2 years he was on the Momoiro Island. But it's hard to specify how long it took him to learn the technique because nothing about that has been revealed yet.
There had been several cases of same techniques but named differently. Skypea for example already had a form of Haki used, but it was called "Mantra" the ability to read other people and their intuition.
I guess culture and ones origin also has something to do with the name. If the crew learned Haki on Skypea they would probably call it "Mantra" instead because the wouldnt know differently. Sky Walk must have been the wording on Momoiro Island. Moon walk may also refer to the dark CP9 appearance, used to emphazise on the shrouded people of CP9 and the Secret highly trained Assassin Organisation. It probably just helps to give the right feeling from viewer towards CP9.
Actually I think there is a difference if you remember cp9 said the MOONWALK technique causes them to become light as a feather making them capable of bouncing on air but if you notice anyone that uses this Rokushiki tachnique has to continously stay bouncing but, the SKYWALK technique that Sanji uses him seems different he has the ability to stay a float mid-air. And as you can see he uses the diablo foot so not only floating but also spinning, his technique is almost as if he is making the sky solid under his feet while walking because if you recall he needs friction to use the diablo foot and with the moonwalk you dont get friction under your feet but the skywalk does.
Its just my observation