High friction limit for Euler–Korteweg and Navier–Stokes–Korteweg models via relative entropy approach