You did fine. When an NG tube is displaced you may not be able to tell how far it was in originally. I find that when in doubt, start over and put down a new one at the correct length and recheck that you get air bubbles in the belly. It was better to pull out a displaced tube that could gag the patient and cause them to vomit and aspirate versus leave a useless item in place.