Peel, core, and cut the apples into 1-inch dice and toss with melted butter in a large bowl. Scatter the apples in the bottom of a roasting pan fitted with a rack.
Season the tenderloin generously with salt and pepper and place on the rack in the roasting pan. Whisk together all remaining ingredients in a small bowl. Put the tenderloin in oven until internal temperature registers 160 to165 degrees on an instant-read thermometer, about 30 to 40 minutes. During the last 10 minutes of cooking brush with half of the glaze. Remove from oven, brush with remaining glaze and allow to rest for 10 minutes on a cutting board before slicing. Serve with roasted apples.