A Goldsboro man was sentenced to life in prison for a 1987 rape for which a wrongly accused man spent nearly two decades in prison.