A first approximation
Let's calculate surface gravity. Assuming an object of density $\rho$ and radius $R$, the surface gravity is
$$g=\frac{4\pi}{3}G\rho R\tag{1}$$
For a white dwarf, $\rho\sim10^9$ kg/m$^3$. If we want $g=9.8$ m/s$^2$, we find an $R$ of 35 meters. If you scale that up to a radius of even 2 km (a 4 km diameter), we find a surface gravity of 559 m/s$^2$. In other words, only a very small amount of your asteroid can be filled with white dwarf matter.
Let's go back to a different way of writing $g$:
$$g(r)=\frac{GM}{r^2}=\frac{G}{r^2}\frac{4\pi}{3}R^3\rho\tag{2}$$
where I've substituted in $M=\frac{4\pi}{3}R^3\rho$. Here, $R$ is the radius of the blob of white dwarf matter. If we want $g=9.8$ m/s$^2$ and $r=2$ km, we find we need a blob radius of $R=520$ meters - roughly one fourth of the body's radius. I've assumed that the mass between the blob and the surface doesn't contribute much to $g$.
The big issue? There's a kilometer and a half of material between the blob and the surface, and the gravitational force at $r=R$ is going to be a lot. $g(R)$ will be about 145 m/s$^2$. Therefore, you need the material inside the asteroid to be able to withstand such forces. That's not easy. The pressure will be pretty large. Think carefully about this before constructing it.
A true white dwarf
Go read Cort Ammon's answer (and upvote it!). They talk about how, thanks to electron degeneracy pressure, white dwarfs obey a curious mass-radius relation:
$$R\propto M^{-1/3}$$
In other words, the more massive a white dwarf, the smaller it is. Now, let's rewrite this as a scaling law, using Sirius B as an example. It has a mass of half a solar mass, and a radius of 0.003 solar radii. We can then write
$$\frac{R}{0.003R_{\odot}}=\left(\frac{M}{0.5M_{\odot}}\right)^{-1/3}\tag{3}$$
Now, let's rewrite density. The mean density of Sirius B is roughly $3\times10^{10}$ kg/m$^3$. We then have
$$\frac{\rho}{3\times10^{10}\text{ kg/m}^3}=\frac{M}{0.5M_{\odot}}\left(\frac{R}{0.003R_{\odot}}\right)^{-3}=\left(\frac{R}{0.003R_{\odot}}\right)^{-6}$$
using our mass-radius relation. Plugging this into $(2)$ gives us
$$
\begin{align}
g(r) & =\frac{G}{r^2}\frac{4\pi}{3}R^3\left[3\times10^{10}\left(\frac{R}{0.003R_{\odot}}\right)^{-6}\text{ kg/m}^3\right]\\
& =\frac{G}{r^2}\frac{4\pi}{3}R^{-3}(3\times10^{10}\text{ kg/m}^3)(0.003R_{\odot})^6
\end{align}
$$
This then gives us $R=37.4R_{\odot}$. Cort Ammon got something within about a factor of 2, because they chose to not use general relativity (which didn't matter, honestly, for our purposes).
Degeneracy pressure
This mass-radius relation arises because a white dwarf is supported by electron degeneracy pressure, arising from the Pauli exclusion principle. Essentially, no two alike fermions (matter particles like electrons, quarks, etc.) can exist in the same quantum state simultaneously. Thus, when you compress a whole bunch of fermions, there's a pressure that resists the compression. In a white dwarf, this comes from electrons; in a neutron star, this comes from neutrons.
The mass-radius relation problem occurs in certain other bodies of degenerate matter, including neutron stars. For neutron stars, the mass-radius relation is not well-known because the equation of state (EOS), the equation relating pressure and density, is not known exactly. It's a very active area of research, both observationally and theoretically. Nonetheless, if you were to substitute in a neutron star or a quark star or some other body, you'd still have a problem.
Out of curiosity, let's try to calculate the minimum radius of a white dwarf. The maximum mass is given by the Chandrasekhar limit of about $1.44M_{\odot}$. Substituting this into $(3)$ gives $R_{\text{min}}\approx0.0021R_{\odot}$, or about 1467 km. That's not helpful. What it we push things even further, and try to find the smallest a neutron star can be? Well, the Tolman-Oppenheimer-Volkoff limit is essentially the analogue of the Chandrasekhar limit; it's about $2.25M_{\odot}$. Optimistic equation of state models give us a radius of about 9-10 km. Again, that's too high.
What about quark stars? These are hypothetical objects made primarily of a quark-gluon plasma, lying in about the same mass range as neutron stars. They're thought to be denser than neutron stars, and smaller, and, more importantly, from the little we know about their equation of state, the smallest ones should also be less massive. The problem, of course, is that they still aren't small enough. 6-8 km is reasonable for a somewhat small quark star. Additionally, we don't know very well how they behave; our constraints on the EOS are poor.
Figure 4, Rodrigues et al. (2011). Mass-radius relations for quark stars.
From the little I know about quark stars, the mass-radius relation depends on the ratio $\bar{\Lambda}/\mu$, where $\bar{\Lambda}$ is something called the renormalization subtraction point and $\mu$ is the much more familiar chemical potential. Setting $\bar{\Lambda}/\mu=2$ and $\bar{\Lambda}/\mu=3$ yield very different results, possibly differing by a factor of 2 (see Fraga et al. (2001)). If $\bar{\Lambda}/\mu=2$, we could see smaller quark stars.
That said, if we use some of the smallest radii fit by this optimistic value by Fraga et al., we find that, for $R=4$ km, $M=0.2M_{\odot}$, and so $g=1.66\times10^{12}$ m/s$^2$.
That's too high.
A black hole
We do have one more option. The more massive a black hole, the larger it is, and the less massive a black hole, the smaller it is. Say we instead put a black hole at the center of the asteroid, which has $r=2$ km. For our desired surface gravity, we need $M=5.87\times10^{17}\text{ kg}$. Calculating the Schwarzschild radius gives us $R_s=8.72\times10^{-10}$ m, which fits more than comfortably inside the asteroid.
Now, the black hole might evaporate via Hawking radiation, but it will take a long time - roughly $5\times10^{29}$ years, or 500 billion billion billion years. So it's going to stick around for a while. However, the gravity is still enormously strong, and it's going to accrete the rest of the planet pretty quickly.