The former pastor of a Southern Baptist church in Texas has been sentenced to 17 years in prison after admitting he molested a girl for about five years beginning when she was 13.