Efficient Training of Physics-enhanced Neural ODEs via Direct Collocation and Nonlinear Programming