Just download the 4.1 stock firmware. You find it on here: iphoneheat.com/2010/09/download-ios-4-1-firmware-for-iphone-and-ipod-touch/. Just make sure you get the one for iPhone 4 (iPhone3,1_4.1_8B117_Restore.ipsw). When you download it, first you need to modify your hosts file on your computer to trick iTunes into looking at Cydias server for the 4.1 signature.
Originally Posted by h22artman
So, in Notepad, open the file:
"C:\Windows\System32\drivers\etc\hosts (on Windows)" or "/etc/hosts (on Mac OS X)" and add "18.104.22.168 gs.apple.com" to the bottom of the file, without the quotes. Then go to File, save. Then close the file.
Note: If you're on Windows and it doesn't let you save the host file, you can try disabling UAC, or go to File, Save As, and save the hosts files as "hosts" and select your desktop as the destination. Close the host file, then copy the hosts file from the desktop, and paste it in the location of the original host file and press Yes to replace.
Now what you need to do is go into iTunes, sync your phone to back it up. When it's done, hold shift, click Restore to restore the phone, and navigate to the location on your harddrive where you saved the stock 4.1 firmware file. Press ok. If for some reason the phone is stuck in recovery mode after it's done restoring or gives an error, don't worry, the restore is completed. Just use tiny umbrella to kick the phone out of recovery mode.
Then restore your phone from your backup and sync all of your media back to the phone. Then jailbreak with your choice of either Limera1n or Greenpois0n. Good luck!