If the letter J is only 400–500 years old, was there a J sound that preceded the design of the letter?
Solution 1:
The answer to this is.... complicated.
The letter J is, as you mentioned, relatively recent, and originated as a variant of the letter I. Why that happens is a little complicated, and requires unpacking some assumptions in your question.
In the original languages (Latin, Greek, Hebrew) which provide us with the names Jesus, Joseph, Justinian, etc., the sound which we write as J was pronounced as the English letter Y. (Just to make things confusing for English speakers, the phonetic symbol for this sound is [j].) In Latin, the letter for this was I/i, in Greek it was Ι/ι (iota), and in Hebrew it was י (yod). Thus, the Greek spelling for "Jesus" was Ιησους, pronounced something like "Yeh-SOOS", and the Latin likewise was Iesus.
Subsequently, in the Latin alphabet the letter J was developed as a variant of I, and this distinction was later used to distinguish the consonantal "y" sound [j] from the vocalic "i" sound [i]. However, at about the same time there was a sound change in many of the languages of Western Europe, such that the "y" sound changed into a "j" sound ([dʒ], or sometimes [ʒ]). So we have it that in English, the letter J now represents a consonant [dʒ] which is not obviously similar to the vowel [i], despite the fact that they descend from the same letter and the same sound. (English also has many [dʒ] sounds spelled with J which come from native Germanic roots.)
You can see this history worked out differently in the spelling systems of German and many of the Slavic languages of Eastern Europe, where the letter J spells the "y" sound [j], and the letter Y, if used at all, is primarily used as a vowel.
Solution 2:
As @Laure mentions, this really belongs to the Linguistics group as this is a wider question pertinent to Latin and all/most Latin-influenced European languages.
Classical Latin did not have a distinct J sound (the J as we know in English.) When I was followed by another vowel, it usually sounded similar to English /Y/. Thus we had Iulius which was as if you said /Yulius/ or /Yulyus/.
In the Middle Ages, a new letter was assigned to this sound - J. However, it can be seen from even a casual glance that there has been widespread confusion of this and related sounds in many Western European languages.
In Spanish, for example, the /y/ sound moved to the letter /LL/, whilst the letter J picked up the guttural /ch/ which is due to possible Arabic influence.
In English meanwhile, an original prevocalic (i, e) /g/ sound palatalized to /j/ and eventually to /y/. We can see these when we compare Dutch or German cognates.
Yesterday - Gestern
This outline only partially touches upon the question asked, but I hope throws some light on the evolution of the sounds around the letter J in a broader context.
Solution 3:
The quick answer is "yes" to both questions. Before j became differentiated from i, the "J" sound could be spelled with g in various combinations (edge, gem, exaggerate, etc.); and in ancient times, the names you mentioned were pronounced with an initial "Y" sound. Transcribed from Hebrew, Jesus was Yeshua. The Romans would have spelled Justinian "Iustinianus."