If it was just a case of not going into gear smooth like from neutral to 2nd then that can happen due to poorly adjusted chain, worn gear lever. Or it could be as it was in my case the clutch basket was worn enough so that the friction plates weren't releasing and causing drag.
But the fact its happening from 2 to 3rd and that fact that its not selecting a gear at all means, could possibly you have either bent or very worn selector fork, or a very worn selector drum. and both of those are an engine split to fix. If its a broken return spring, I think Ive read there are outside the main crankcase and can be replaced easily enough. But the guy you swapped your DR400 for was CLEARLY fucking aware of the fault prior to selling it to you. I know this, because this has also happened to me.
Take the bike back to him and demand in no uncertain terms a full refund and your DR400 back, if he give you any lip state you will then include all costs incurred to date (travel to collect the bike, etc etc) to the refund price.