For one-step-ahead forecasts, confidence intervals are based on the distribution of residuals, either assumed (e.g. normal with a mean 0 and an estimated standard deviation, possibly with a transformation), or empirical. The problem is much more complex, to say the least, for several step-ahead forecasts, except in the special case of independence and normality of the true errors. I don't know LSTM (you should provide more details about that) so I cannot help you for the mathematical details.