If you want it to just stop charging by itself, then set the voltage output to 13.8 V. This is the "nominal" float charge for lead-acid batteries. To fast charge at 14.4 V, you need to detect the drop in charge current and reduce the voltage to the float voltage to finish the charging. If you keep the voltage at 14.4 V after the fast charge phase is done (after the current drops) then the battery may off-gas (convert its water to hydrogen and oxygen), and the plates will erode over time. Float charging alone won't give you optimum capacity, but it is perfectly safe for set-and-forget charging.
You also generally need to limit the current at the beginning of the charge (when the battery voltage is below the charger voltage of 13.8-14.4 V) to generally no more than 1/10 of C (capacity). The internal current limiting of the LM317 should limit current to around 2 A (it is guaranteed to deliver 1.5 A but will do more before limiting) so it should be safe with 20 AH batteries without additional limiting. Otherwise, you can use a resistor; there will only be a maximum of ~2 VDC across the resistor even when the battery is very empty, so it will need to be a smallish value.