17 minutes should be enough, most people will make transfer with that time. I think even if you made a wrong turn and end up at wrong place, 17 minutes will be enough. However, I just do not know how slow you will be moving with two kids and luggage in tow, so that will be unknown part…
If you missed NEX train at Shinagawa then simply go to a ticket office at Shinagawa station and have tickets reissued for next NEX to Narita Airport.