Can you specify where this error is thrown, i.e., in which line of your code or at least whether in the encoder or decoder. When going through the tutorial, I cannot see why switching from GRU to LSTM should cause any troubles. I usually write my models in such a why that the choice of cell is configurable, and there are not many cases to consider.
The hidden state of both GRU and LSTM has a shape of (num_layers * num_directions, batch, hidden_size) – LSTM has also a cell state with the same shape. Looking at your error, the first dimension (i.e., num_layers * num_directions). Without any more details, I would guess that something with the values for num_layers and/or num_directions might be off.