Yahoo is picky about when - if ever - it will let GMail into your account to import messages, even when your username and password are correct. I can't import from my Yahoo account either, so you are not alone.

If your Yahoo account offers POP access then try Mailfetcher instead - see the link for how to set it up. Note that you may have to enable POP in Yahoo first.

Alternatively, you may be able to use IMAP to download the contents of your Yahoo account to an email client like Thunderbird - Thunderbird will pre-populate all the settings for you, so it's just a matter of giving Thunderbird your Yahoo username and password.

Once Thunderbrid has downloaded your Yahoo messages, then you can also set up your GMail account in Thunderbird - again, Thunderbird will use the correct settings, so just supply your username and password.