Go to sounds and notifications and under "while locked" choose do not show notifications. That turns off all lock screen notifications.
If you want other lock screen notifications just not text messages, go to your messaging app, settings, notifications, then uncheck preview message in status bar and lock screen.