Walnut (genus Juglans) fruits are nuts, not drupes.
It is indeed a difficult fruit to classify regarding the traditional classification ("dry" vs "fleshy"), but it is easy to see what's happening here: the fleshy structure is not derived from the pericarp and, therefore, it is just an accessory fruit (just like the cashew fruit, in which the dry fruit is the nut, or strawberries, in which the dry fruits are the black "seeds", not the pinky flesh structure).
This becomes clear when we check the classification of the fruits of the Family Juglandaceae, to which the walnut belongs. According to Milliken (2009):
Fruits are nuts enclosed by fleshy or winglike fused bracts/perianth, giving a samaroid or drupaceous appearance. (emphases mine)
And, according to Manning (1940):
Whole fruit drupelike, but the husk derived from the involucre and the calyx, and the skin from the calyx alone, neither one from the pericarp, hence fruit not a true drupe. (emphasis mine)
The same Manning, in his book titled "The morphology and anatomy of the flowers of the Juglandaceae" (1926), explains it better:
The whole fruit is drupaceous, in that it superficially resembles a drupe, but is not a typical drupe (a true drupe is a fruit in which the outer portion of the pericarp is fleshy, the inner portion hard or stony).
Have in mind that in the traditional classification "dry" and "fleshy" are mutually exclusive, meaning that a given fruit can be one or other, but not both. Therefore, your textbook is correct and the Wikipedia link is wrong.
Milliken, W. (2009). Neotropical Juglandaceae. In: Milliken, W., Klitgard, B. & Baracat, A. (2009 onwards), Neotropikey - Interactive key and information resources for flowering plants of the Neotropics.
Manning, W. (1926). The morphology and anatomy of the flowers of the Juglandaceae.
Manning, W. (1940). The Morphology of the Flowers of the Juglandaceae. II. The Pistillate Flowers and Fruit. American Journal of Botany, 27(10), p.839.