A man charged in the 2024 capital murder of a 12-year-old boy has pleaded guilty and accepted a 50-year prison sentence.