Lancaster man sentenced to life in prison after pleading guilty