How do pilots avoid radiation?
Broadly speaking, radiation exposure can be mitigated in three ways: Time, Distance, and Shielding.  Two of these mitigating factors can't really be improved: Distance and Time.

For distance, the radiation exposure concern for commercial jet pilots (and travelers)is generally related to cosmic radiation and ultraviolet radiation from the sun. The sources are already quite distant, and the practical distances we can achieve on Earth won't make any appreciable difference here, so we can neglect distance.

Time (duration of exposure) is already somewhat limited by the duration of flights, but the cumulative effect over multiple flights is what we're generally concerned about when we discuss "pilot's radiation exposure".
As their career requires them to fly, and the nature of jets means they'll be flying at high altitude there's not much that can be done with time, except perhaps having a very short career or not accepting a large number of flights. These options are not economically attractive if flying is your career.

That leaves shielding. Pilots sacrifice the benefit of shielding (from the Earth's atmosphere) as they climb: The atmosphere is less dense and there is less of it between the pilot and the background radiation, therefore their exposure is increased.
It's here that improvements can at least theoretically be made: The pilots and passengers already gain some shielding from the structure of the aircraft, but not nearly as much as 30,000 feet of atmosphere provides. The aircraft could be constructed with additional radiation-shielding materials (lead foil for example, and UV-attenuating tints in the windows) but doing so would add a significant amount of weight.

As with most radiation shielding situations it ultimately becomes an economic trade-off: You implement shielding to bring the exposure (dose) down to an acceptable level given the time and distance constraints you're working within.
The additional dose received by pilots is already extremely low, and adding shielding to reduce it further would not give a huge increase in safety. The costs (in terms of aircraft design, construction, and operating cost to carry the additional weight) would exceed the cost of treating the relatively minor complications such as skin cancer which may result from the additional exposure over a lifetime career of flying.



If all of that was too much to read, the short answer to your question is "The best way to mitigate increased radiation exposure from flying is to remain at low altitudes." (Similar to how the best way to mitigate the increased radiation from living in Denver, Colorado at ~5,000 feet above MSL is to move to New Orleans, LA at 7 feet below MSL.)  

The next best thing would be to fly less frequently or on shorter legs (to reduce the duration of exposure).