Simple DC circuits: Power dissipated, be it a resistor or an LM317 is E*I. If you are starting with 28V source, and want to drop it to 19V, there is 28-19V = 9V across the regulating element, be it a resistor or a LM317. If the current to the load is 0.3A, the power being dissipated is 0.3A*9 = 2.7W. Nothing you can do about this, short of using a Switched Mode Power Supply (Google "SMPS").
Now what you can do something about is getting rid of the heat?(Google "Heatsink"). To keep the LM317 from protecting itself and shutting down due to excessive temperature, you have to keep it's tab from exceeding about 85degC. Starting from a room temperature of 25degC, that means you can allow a temp rise of 60degC, which means the thermal resistance of the heatsink must be less than 60degC/2.7W or 22 degC/W.
Look at these clip-on heatsinks] available from DigiKey.