Yes you can substitute cucumber for zucchini in soup if you want too.
You can make any type of soup you want to make and if you prefer to use cucumber in soup then you'll be making cucumber soup.
If you want to use zucchini in the soup then you make zucchini soup.
But if you want to make zucchini soup then you must use zucchini in the soup but if you just want to make soup then you can use whatever you like.
It doesn't matter whether you want to use zucchini or cucumber in the soup.
I like to make cucumber soup sometimes and it turns out great and other times I prefer to have zucchini in my soup.
And then sometimes I make soup using both the zucchini as well as the cucumber and it turns out great as well.