If $\pi$ is transcendental, the $\sqrt{n^2+\pi^2}$ are linearly independant over ${\mathbb Q}$: take a linear combination and notice that $\sqrt{n^2+\pi^2}$ is the only member of the family that is not smooth at $\pi=in$ (this proof would also show independance over ${\mathbb Q}(\pi)$).

If one wants to be more precise, one can argue in this way. Let $C$ be the algebraic curve over ${\mathbb Q}$ defined by equations $Y_n^2=X^2+n^2$ (for $n$ in a finite set $I$), then the point $\pi$, $\sqrt{\pi^2+n^2}$, $n\in I$ is
a generic point of this curve as $\pi$ is transcendental. So, if a function
vanishes at $\pi$, it is identically $0$. One can also use down to earth arguments by taking the product of the $\sum \pm a_n\sqrt{X^2+n^2}$ to get a polynomial in $X$ with rational coefficients: if this polynomial is $0$ at $\pi$ then it is identically $0$ and one of the factors is identically $0$, etc.