Creality Ender 3 - printing in front of the build plate
When a print is not printing on the build platform, you either:


Have the incorrect settings in the slicer (e.g. Ultimaker Cura, a common mistake is that the "origin at center" option is active), or
Have the center of the bed incorrectly stored in your firmware. (See: How to center my prints on the build platform? (Re-calibrate homing offset) or Recalibrating Home-position).


Note that the most simple change (after you verified the slicer settings and confirmed that it still does not print in the center) is adjusting the settings in the slicer (bed settings, of start G-code script), this way you do not need to compile and upload new firmware (e.g. if you are uncomfortable or inexperienced in doing so), but, fixing it in the firmware is the best solution. Why? If you change the offset in the slicer you force the bed dimensions to a new position that you know where it is, while if changed in the firmware, the printer "knows" the actual size and the limits.



To fully answer your question, we need a little more information what slicer you use and what the current settings are. From your question it sounds as if the offset is more than a few millimeters. Usually this hints to an incorrect slicer setting (frequently Ultimaker Cura).