Military personnel and veterans will be given free train travel for remembrance services.