The answer is yes, at least if the group $G$ is metrizable $\iff$ $G$ is Hausdorff and has countable basis of neighborhoods of the identity element $e$. This follows from the following general statement.

<blockquote>
<b>Proposition.</b> Let $G$ and $G'$ be topological groups, with $G$ locally compact and metrizable and $f:G\to G'$ be a continuous homomorphism such that <br>
(a) $f$ is a bijection; and <br>
(b) the induced map $f^*:C^b(G')\to C^b(G)$ of the spaces of bounded continuous functions is surjective. <br>
Then $f$ is a homeomorphism.
</blockquote>

Let $G'=\theta(G)\subset H$ with the subspace topology, $f$ be the same map as $\theta$, but with codomain $G'$. Then $G'$ is also locally compact, therefore, it is closed in $H.$

<b>Proof.</b> Let $d:G\to\mathbb{R}$ be the distance to $e$. Without loss of generality, $d$ may be assumed to be bounded. Consider the function $d':G'\to \mathbb{R}, d'(y)=d(f^{-1}(y)).$ Then <br>

(1) $f^{*}d'=d$;<br>
(2) by (a), $f^{*}$ is injective, so $d'$ is the only pre-image of $d$ under $f^*$; and <br>(3) by (b), $d'$ is continuous. <br>

The open ball in $B(e,r)\subset G$ consists of all $x\in G$ such that $d(x)<r$, so $$f(B(e,r))=\{y\in G':d(f^{-1}(y))<r\}=d'^{-1}((-\infty,r))$$
is open in $G'$ by (3). Since open balls form a neighborhood basis of $e$, the map $f$ is a homeomorphism. $\square$