What exactly happens to kinetic energy in the turbulent layer on an aerofoil?
Energy is transferred from the moving airplane's skin into the air in the turbulent boundary layer. Because the layer is turbulent, all the momentum vectors for every little parcel of air entrained in the layer are pointing in random directions with some uniform component (in the direction of the plane's travel) superimposed.
Thus the air in that layer gets vigorously stirred up, and since air has viscosity, the stirring action gets fairly quickly transformed into frictional heat. So after the plane has departed out of the picture, the turbulence and net motion in its wake get dissipated and the air is left a little warmer than it was before the plane flew through it.