Chosen Solution

Can you use a 2004 accelerator pedal sensor in a 2011 Yukon Denali

Only if it’s the same part number. If yours isn’t marked, look them both up to check. The wrong TPS (throttle position sensor) could ruin other expensive things. Unless certain, get the right one.