There are many reasons that could lead to hematospermia which usually associate with the urethra or the prostate. I would suggest you to visit a specialist doctor (andrologist, urologist)
Blood in semen is called hematospermia. It can occur due to many conditions such as infections, swellings (inflammations), cysts, stones & other obstructive lesions, and benign or non-benign tumors of the organs of the genitourinary system (involving the bladder, urethra, the testicles, the seminal vesicles, the epididymis, the prostate gland etc). Investigations include blood tests, routine & culture tests of urine & semen, ultrasound & MRI scans of genitourinary system, and histopathological tests (FNAC, biopsy etc).
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.