No. Dylan and Cole Sprouse did not write the song "Battlefield" for Jordin Sparks.
The credited writers are:
The misconception may stem from the twins' peak Disney Channel popularity at the time (2009), but they have no songwriting credit on the track.