X-Ray Emission from Stellar Jets by Collision against High-density Molecular Clouds: an Application to HH 248