A Virginia man charged in the death of his girlfriend's toddler took a guilty plea in court and will spend the next 40 years behind bars.