Reducing Distraction in Long-Context Language Models by Focused Learning