David Tennant did appear in Harry Potter and the Goblet of Fire (2005) as Barty Crouch Jr. (Polyjuiced as Moody for most of the film). He was ~34 during filming (born 1971).
He later became the Tenth Doctor (Doctor Who, 2005–2010).