They are etymologically similar names, not one in the same.
Jesus is translated from the Latin transliteration of the word Ἰησοῦς (Iisous or Iesous), which is the Greek word for the Hebraic name ישע (Yeshua), which means loosely "Yah (God) saves".
Joshua is the direct English cognate for the Hebraic name יהושע (Yehoshua), which is simply a longer form of the name Yeshua.
Both names were common in the Second Temple period (516 BC - 70 AD).