This should not be a major project if you have access to the end of the pipe.
Others will chime in to tell you about the brands and the how to's.
I want to let you know that this is something that you really need to fix because what you are doing is pumping "grey water" out to an open ditch.
This is against the codes and depending on where you live, the EPA or Enviromental Services folks as well as you local Health Officer might come knocking at you door some day. Time is not on your side.