What is the differance between gliding for maximum range and gliding for maximum endurance?
No they are different.

Gliding for endurance, maximum time in the air, is at minimum sink rate, which is usually close to stall because it's where maximum lift is being generated. In a glider this is the speed you thermal at.  In a power plane it might be the speed you'd glide at if you wanted to delay the inevitable as long as possible for some reason, say if your engine quit while sightseeing over a lava field during a volcanic eruption.

Gliding for range, flattest glide, is at max L/D speed for the weight, which also affected by the wind's effect on "effective" L/D or glide angle relative to ground covered.   If you were in the volcanic eruption scenario, it's the speed you'd wished you'd flown at as you realize you could have cleared the lava field if you'd sped up to best glide angle.

I'm only partly kidding around; inexperienced glider pilots can fall into a trap, when they get in sinking air, of slowing to min sink to minimize their rate of descent, when the proper action is to speed up to best L/D, or faster, to get through the sinking air as fast as possible, even though their sink rate goes up even more.  I tell students to think of sink as a rain shower while strolling; you run to spend as little time in the rain as possible.