While the war arc is generally canon-heavy, there are a few filler episodes scattered between Episodes 271–289 (specifically the "Power" arc and some flashback episodes) that you can skip if you only want the main story.
However, there is a distinction between the declaration of war, the start of the conflict, and when the actual fighting reaches the main characters. what episode does the ninja war start
The short answer: .
: Episodes 261–321.