When you sync the 3GS with iTunes, it will back everything up. Then you simply plug in the iPhone 4 and it will ask you how you want to set it up. Choose the backup that was just made and iTunes will sync everything exactly as you had it with the 3GS. Texts, settings, camera roll, emails, app locations, etc. You will lose nothing.