No, they didn't forget it at all. The actual cause wasn't known at either time. They did not know of vitamin c, or that scurvy was a deficiency disease. It might've been ventilation or salt or bilge-water or bacteria or anything - they did not know what caused it, and there was plenty of speculation.
But it was still well known in the 19th century that fruits and vegetables prevented scurvy (were 'antiscorbutics') was well known. The fact that citrus fruits seemed particularly effective was known as well, if you see for instance the entry on antiscorbutics in the Penny Cyclopedia (1843), which says as much. It also explicitly mentions Lind's 18th century work in the entry for scurvy.
Or this 1858 report by A. Armstrong: Observations on naval hygiene and scurvy : more particularly as the latter appeared during a polar voyage. From the first page of the first chapter:
Unimportant as at first sight it may appear, it is indisputable, that the application of Lemon-juice for the prevention and cure of Scurvy, so far back as 1564, has been attended with the greatest and most beneficial results, not only to our own country, but to the world in general.