To calculate the distance, you need to take the absolute value of the velocity function, like you said. On the interval [0,6], the function is negative on [0,2] and [4,6] and positive on [2,4].
So your distance is given by
You can easily integrate all of these and find that the distance traveled is meters.
(You will also see that if you take you will get , which is exactly what you calculated for displacement.)