"It was really cool to be able to speak with [Demi] about what she was going through in her life and craft a song for the setting," Jonas says.