As mentioned, there is a varying length of different lines. There are stanzas that also vary: the first stanza is eight lines, the second is six lines, followed by a couplet that rhymes with the last two lines of the six-line stanza that precedes it. The last stanza has twelve lines.
Wilfred Owen's poetic structure reflects the topic of the stanza. While the eight-line stanza, he describes soldiers trudging. The next, shorter stanza may well reflect the pace of the men as they are warned of the danger of the gas. (These images of WWI are expertly captured by Owen.)
The couplet reflects the haunting scene of this moment, that lingers—and Owen sets it apart from the reality of that moment, suspended as the dream that lingers in Owen's consciousness.
The length of the final stanza is much longer, and the movement slower—mimicking a funeral march—as the soldier is carried in the wagon, dying slowly. There is the sense of the unreal, like nightmares (as Owen points out) as they wagon moves. Owen uses the structure of his poem to reflect the message in the poem.