By definition, $B = \sum_{n = 1}^N X_n$ for an independent sequence $X_1, \ldots, X_N \in \text{Bernoulli}(\theta)$. Thus, applying results
one has
\begin{equation}
\begin{split}
\mathbb{E}(e^{i t B})
= \prod_{n = 1}^N \mathbb{E}(e^{i t X_n})
= \prod_{n = 1}^N [\theta e^{i t} + 1 - \theta]
= (\theta e^{i t} + 1 - \theta)^N
\end{split}
\end{equation}
$\square$