The man who was arrested trying to get onto Kylie Jenner‘s property multiple times … has now confessed to murder.

Anaheim PD says Marvin Magallanes turned himself in and copped to killing a 49-year-old homeless man back in January. Cops say they’ve also linked him, forensically, to an unsolved murder from October 2016 of another homeless man.

25-year-old Magallanes is the same man who was arrested twice for his attempts to contact Kylie. As we reported … he drove through the security gate at her exclusive Calabasas neighborhood, The Oaks.