An investigation is under way after a helicopter carrying 18 people was forced to ditch in the North Sea.