For sure, elliptical will increase your cardiovascular fitness, and while it is nothing like running (more like skiing), you can be comfortable doing a 5K. You will not be as comfortable as if you trained by running, but you can do it just fine given you are doubling the distance/time.
For longer distances, elliptical training will not work effectively (if at all) though.