@Mixolydian is correct. I am only adding another answer to emphasise that the idiomatic use is really the only use of this phrase you will ever find in normal English.
It is usually used by a person as a semi-humorous insult towards another person. "Go and take a long walk off [or on] a short pier" means "get lost", or "go and drown yourself".
In the OP's context, the author is directing this criticism at themselves, probably in a self-deprecating way. Depending on context it could be light and humorous or very dark and literally referring to suicide. "I'm sick of myself - I'm going to take a long walk off a short pier."
Finally, I'll mention that I'm more used to the phrase as "Take a long walk on a short pier". It means the same thing, but arguably emphasises the humour better. It is impossible to take a long walk on a short pier ... so you fall off the end and into the sea.