Change membership expiration rules
You can do this by:


Going to Administer menu >> CiviMember >> Membership Types.
Next to each membership type you'd like this to apply to, click the "Edit" link (see screenshot 1 below).
On the Membership Type screen, set Membership Type Plan to "Fixed", set Fixed Period Start Day to "January 1st", and Fixed Period Rollover Day to "July 1st" (see screenshot 2 below).
Press Save.