Here is a code snippet to accomplish moving the SCH segment
// Retrieve the SCH Segment with its fields.
var schSegment = message.getNode('SCH');
// Remove the SCH segment from its current location
message.removeFirstNode('SCH');
// Add it back in after the MSH segement.
message.addChildAfter('MSH', 'SCH', schSegment);