Luigi Mangione agreed to the switch during a court appearance in Pennsylvania.