gas line location for natural gas clothes dryer
The International Fuel Gas Code does not mention any line routing requirements.  (See section 613.)

If it were me, I would fasten some wood blocking to protect the gas line from being pinched by the dryer should it walk or be moved.  It should probably go along the right edge of the nook, especially at the front, and at the front of the right side of the original space.  2x4 flat against the wall should be more than enough.