Suppose an action $S = \int _{t_1}^{t_2} L(q(t),\dot{q}(t))$ that is invariant under an infinitesimal constant time translation $t \longrightarrow t' = t + \epsilon$, of course with $\epsilon = constant$, such that
\begin{equation} q(t) \longrightarrow q(t + \epsilon) = q(t) + \epsilon \dot{q}, \delta q = \epsilon \dot{q} \\ \dot{q}(t) \longrightarrow \dot{q}(t + \epsilon) = \dot{q}(t) + \epsilon \ddot{q}, \delta \dot{q} = \epsilon \ddot{q}. \end{equation}
So the variation on action $S$ will be
\begin{align} \delta S &= \int _{t_1} ^{t_2} dt\ \left[ \frac{\partial L}{\partial q}\delta q + \frac{\partial L}{\partial \dot{q}}\delta \dot{q} \right ]\\ &= \int _{t_1} ^{t_2} dt\ \left [ \epsilon \dot q \frac{\partial L}{\partial q} + \epsilon \ddot{q} \frac{\partial L}{\partial \dot{q}} \right ] \\ &= \int _{t_1} ^{t_2} dt\ \epsilon \left [ \frac{dL}{dt} \right ] \\ &= 0.\\ \Longrightarrow \frac{dL}{dt} = 0. \end{align}
Assuming the Lagrangian has no explicit dependence of time, we have
\begin{equation} \frac{dL}{dt} = \frac{\partial L}{\partial q} \dot{q} + \frac{\partial L}{\partial \dot{q}} \ddot{q} = 0. \end{equation}
At this point, I don't see how to obtain that the Hamiltonian of the system is conserved, as the textbooks I've read say. Did I make some wrong assumption or computation?