Idea: Only the gradient of the field produces a net force on a current loop. Since $B$ varies linearly in $x$, only the two sides oriented so that current flows along $\hat{y}$ feel a net imbalance.
Working: For a segment carrying current $i$ along $\hat{y}$ in field $B\hat{k}$, the force per unit length is $i\,\hat{y}\times B\hat{k} = iB\,\hat{x}$. The right side sits at $x+l$ with field $B_0(1+\tfrac{x+l}{l})$ and the left side at $x$ with field $B_0(1+\tfrac{x}{l})$, carrying opposite currents. The difference in force magnitude is
\[\Delta F = i\,l\,\big[B_0(1+\tfrac{x+l}{l}) - B_0(1+\tfrac{x}{l})\big]\]
\[\Delta F = i\,l\,B_0\cdot\frac{(x+l)-x}{l} = i\,l\,B_0 = iB_0 l\]
The two sides carrying current along $\hat{x}$ experience identical opposing forces (same $x$-range) and cancel exactly.
\[\boxed{F_{net} = iB_0 l}\]