When writing letters, be genuine and specific. You can try to include references and puns to what your friend is participating in (i.e. "steel" your will for victory).
In a good luck letter, you should include a special quotation chosen especially for the recepient. Consider a proverb, a Biblical passage or an old wise saying.
Be upbeat and enthusiastic with your word choices. IronMan competitions are grueling events, so it's nice to use words that convey thoughts of confidence to your friend.
To promote as much inspiration as possible with a letter encouraging 'good luck', you should avoid using too much optimism. Just be honest and heartful.