I found the same translation for 検察官 and 検事 : "public prosecutor". But I guess there is a reason for the two words to exist. Is one of them more formal ?
検察官 is "public prosecutor". 検事 is the name of a position of a public prosecutor. Their job descriptions are 「検事総長」,「次長検事」,「検事長」,「検事」,「副検事」sort by highest in rank to lowest.