  Luminous infrared galaxies at high redshifts ($z$>4) include extreme
starbursts that build their stellar mass over short periods of time (>100 Myr).
These galaxies are considered to be the progenitors of massive quiescent
galaxies at intermediate redshifts ($z\sim$2) but their stellar structure and
buildup is unknown. Here, we present the first spatially resolved near-infrared
imaging of GN20, one of the most luminous dusty star-forming galaxies known to
date, observed at an epoch when the Universe was only 1.5 Gyr old. The
5.6$\mu$m image taken with the JWST Mid-Infrared Instrument (MIRI/JWST) shows
that GN20 is a very luminous galaxy (M$_\mathrm{1.1\mu m,AB}$=$-$25.01), with a
stellar structure composed of a conspicuous central source and an extended
envelope. The central source is an unresolved nucleus that carries 9% of the
total flux. The nucleus is co-aligned with the peak of the cold dust emission,
and offset by 3.9 kpc from the ultraviolet stellar emission. The diffuse
stellar envelope is similar in size to the clumpy CO molecular gas
distribution. The centroid of the stellar envelope is offset by 1 kpc from the
unresolved nucleus, suggesting GN20 is involved in an interaction or merger
event supported by its location as the brightest galaxy in a proto-cluster. The
stellar size of GN20 is larger by a factor of about 3-5 than known spheroids,
disks, and irregulars at $z\sim$4, while its size and low S\'ersic index are
similar to those measured in dusty, infrared luminous galaxies at $z\sim$2 of
the same mass. GN20 has all the ingredients necessary for evolving into a
massive spheroidal quiescent galaxy at intermediate $z$: it is a large,
luminous galaxy at $z$=4.05 involved in a short and massive starburst centred
in the stellar nucleus and extended over the entire galaxy, out to radii of 4
kpc, and likely induced by the interaction or merger with a member of the
proto-cluster.
