Exact solutions to higher-order nonlinear equations through gauge transformation