A man who had previously been charged with murdering a 19-year-old has had the case against him dropped.