Amazon will not credit any different card. They cannot know that the different card number is in fact a replacement for the old one you used.
Your card issuer, however, can. If receive the refund form Amazon, and can transfer it to the new card. However, you need to talk to them and ask them if and how will they do that. They may decide to apply it to the fraudulent transactions' balance instead of giving it to you, to reduce their losses, so you need to talk to them beforehand and make sure that since the refund is for the purchase made before the card was cancelled, they will transfer it to the new card with all the rest of the information.
Another option is to request a refund to your Amazon account as a gift card balance for further purchases. I know that many retail shops will gladly give you a gift card instead of the cash/credit refund, so it may be worth your while to check with Amazon if they do that too.