Climb as many easier peaks as possible first. That's the best way to train. It's also the best way to learn how fast you can comfortably hike, how altitude affects you, how much you need to eat, etc. Climb easier stuff first, and Whitney will be just one more hike, only longer.
The permit system is a real PITA. If you show up at the Visitor Center in the middle of the week, you have a good chance of getting a cancellation or no show permit.
Finally, my favorite altitude advice: The best sleeping altitude is the highest altitude at which you don't get sick. I would sleep at Whitney Portal the night before your hike.